Description
Is your feature request related to a problem? Please describe
Many open-source projects have adopted the following workflow for making contributions:
- a central repository, usually under a GitHub organization
- contributors fork the central repository
- they make changes in their fork
- then they submit a PR to the main repository
Which can also be illustrated as follows:
Some of these contributors can be maintainers with write access to the central repo, some are casual contributors without such rights. These maintainers can usually push directly to the branch of the contributor repo, for example to make minor changes to a PR.
However Gitpod does not seem to be allowing this at the moment.
Describe the behaviour you'd like
Just like the GitHub UI allows maintainer for pushing to the branch of the contributor:
It should also be possible to push to the branch of the contributor from a Gitpod instance from the command line with git push origin branch-name
.
Here is a video summarizing the desired workflow. Attempting to do this on Gitpod gives a 403:
gitpod-workflow.mp4
Whereas it is possible to do this via the GitHub UI:
demo-commit-github.mp4
Describe alternatives you've considered
I have been using the following workarounds for now:
- start Gitpod from a PR, make a small change, then copy the change from the Gitpod instance (for example a formatting / prettier pass). Then use the GitHub UI to edit the contributor's branch directly and paste the change.
- same as above, but open a PR targeting the fork of the contributor instead of pushing to the branch directly.
- clone the repo locally without using Gitpod. Make a change, commit and push to the contributor's branch directly. GitHub allows this from the CLI over SSH (and HTTPS?).
- open a new PR while keeping the commits from the original branch, just to be able to push new changes on top of it
Each of these have drawbacks:
- This is tedious, and doesn't scale if the change to apply is large
- This adds an additional round-trip and the other contributor first has to merge the PR. Sometimes they might not be notified about the PR on their fork unless they are pinged explicitly.
- This is a manual workflow that doesn't use Gitpod, which is long and tedious
- This breaks the normal flow of keeping the commits and the existing conversation in one place (previous comments and reviews are not moved to the new PR)
Additional context
This was also briefly discussed on Twitter a couple of months ago: https://twitter.com/jtpio/status/1555533757695856640
Thanks for the help!