Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Push and create PR" button sending wrong query #7565

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rbren
Copy link
Collaborator

@rbren rbren commented Mar 27, 2025

Description

This PR fixes an issue where the "Push and create PR" button was sending the wrong query. The button was supposed to send a query to create a pull request with a meaningful branch name, but it was sending the query associated with "Push to Branch" instead.

Changes

  • Updated the ActionSuggestions component to ensure each button sends the correct query
  • Made the code more explicit by directly using the string values instead of relying on the value parameter
  • Fixed linting issues by removing unused parameters and formatting the code properly
  • Refactored the code to reduce duplication by:
    • Creating a ButtonConfig interface to define button configurations
    • Extracting button configurations into constants
    • Adding a helper function to handle button clicks consistently
    • Improving code maintainability and readability

To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:1878265-nikolaik   --name openhands-app-1878265   docker.all-hands.dev/all-hands-ai/openhands:1878265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants