OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Fix issue #5179: [frontend]: Push to Github button should only push branch, but not creating a PR

Open openhands-agent opened this issue 1 year ago • 16 comments

This pull request fixes #5179.

The PR has successfully resolved the original issue by implementing the requested split functionality for GitHub interactions. Specifically:

  1. 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
  2. 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
  3. 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:~

image

Update - it looks like this now: image


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

openhands-agent avatar Nov 21 '24 18:11 openhands-agent

OpenHands started fixing the pr! You can monitor the progress here.

github-actions[bot] avatar Nov 21 '24 18:11 github-actions[bot]

OpenHands started fixing the pr! You can monitor the progress here.

github-actions[bot] avatar Nov 21 '24 18:11 github-actions[bot]

New OpenHands update

openhands-agent avatar Nov 21 '24 18:11 openhands-agent

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

github-actions[bot] avatar Nov 21 '24 18:11 github-actions[bot]

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

github-actions[bot] avatar Nov 21 '24 18:11 github-actions[bot]

@neubig edited the PR description to include a screenshot

xingyaoww avatar Nov 22 '24 20:11 xingyaoww

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?

neubig avatar Nov 22 '24 20:11 neubig

@openhands-agent Can you put these two button side to side?

xingyaoww avatar Nov 22 '24 20:11 xingyaoww

OpenHands started fixing the pr! You can monitor the progress here.

github-actions[bot] avatar Nov 22 '24 20:11 github-actions[bot]

New OpenHands update

openhands-agent avatar Nov 22 '24 20:11 openhands-agent

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

github-actions[bot] avatar Nov 22 '24 20:11 github-actions[bot]

@openhands-agent please display the "Push to Github" and "Push & Create PR" button side-by-side image

xingyaoww avatar Nov 22 '24 21:11 xingyaoww

OpenHands started fixing the pr! You can monitor the progress here.

github-actions[bot] avatar Nov 22 '24 21:11 github-actions[bot]

OpenHands started fixing the pr! You can monitor the progress here.

github-actions[bot] avatar Nov 23 '24 20:11 github-actions[bot]

New OpenHands update

openhands-agent avatar Nov 23 '24 20:11 openhands-agent

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

github-actions[bot] avatar Nov 23 '24 20:11 github-actions[bot]

@openhands-agent Can you review the comments above and work on it?

xingyaoww avatar Nov 25 '24 15:11 xingyaoww

OpenHands started fixing the pr! You can monitor the progress here.

github-actions[bot] avatar Nov 25 '24 15:11 github-actions[bot]

@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

enyst avatar Nov 25 '24 15:11 enyst

New OpenHands update

openhands-agent avatar Nov 25 '24 15:11 openhands-agent

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

github-actions[bot] avatar Nov 25 '24 15:11 github-actions[bot]

Before click push to PR:

image

Once Push to PR is clicked image

xingyaoww avatar Nov 25 '24 15:11 xingyaoww