Fix issue #5179: [frontend]: Push to Github button should only push branch, but not creating a PR
This pull request fixes #5179.
The PR has successfully resolved the original issue by implementing the requested split functionality for GitHub interactions. Specifically:
-
The original single "Push to GitHub" button that automatically created PRs has been separated into two distinct buttons:
- A "Push to GitHub" button that only pushes changes to the remote branch
- A "Push & Create PR" button that handles both pushing and PR creation
-
The implementation includes proper test coverage to verify:
- The presence of both buttons when GitHub credentials are available
- Correct button labeling
- Proper message handling when each button is clicked
-
The changes maintain backward compatibility while adding the requested granular control over GitHub operations.
This solution directly addresses the original problem by preventing unintended PR creation while still maintaining the ability to create PRs when desired. The clear separation of concerns through distinct buttons provides a better user experience aligned with the requested solution.
A reviewer can verify that:
- Both buttons are properly implemented and visible
- Each button triggers the correct corresponding action
- The test suite covers the new functionality
- The implementation doesn't break existing features
Automatic fix generated by OpenHands 🙌
~It looks something like this:~
Update - it looks like this now:
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:7733d0f-nikolaik --name openhands-app-7733d0f docker.all-hands.dev/all-hands-ai/openhands:7733d0f
New OpenHands update
The workflow to fix this issue encountered an error. Please check the workflow logs for more information.
The workflow to fix this issue encountered an error. Please check the workflow logs for more information.
@neubig edited the PR description to include a screenshot
Thanks! @rbren , wdyt about this design?
For me personally I think it might be nice if we could put the buttons side-by-side to save screen space?
@openhands-agent Can you put these two button side to side?
New OpenHands update
The workflow to fix this issue encountered an error. Please check the workflow logs for more information.
@openhands-agent please display the "Push to Github" and "Push & Create PR" button side-by-side
New OpenHands update
The workflow to fix this issue encountered an error. Please check the workflow logs for more information.
@openhands-agent Can you review the comments above and work on it?
@xingyaoww Hah, sorry, I have the assumption that it will read all comments too, but it doesn't automatically receive them: https://github.com/All-Hands-AI/OpenHands/issues/5236
New OpenHands update
The workflow to fix this issue encountered an error. Please check the workflow logs for more information.
Before click push to PR:
Once Push to PR is clicked