gitpod-io / gitpod-io/gitpod

Allow maintainers with write access to an org repo to push changes to a contributor's branch directly

Open
#15,473 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta: never-stale team: webapp
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

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:

github-flow

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.

github-flow-2

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:

image

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:

https://user-images.githubusercontent.com/591645/209089968-ea5fe7d8-d6f0-4026-8d67-21e0bab66127.mp4

Whereas it is possible to do this via the GitHub UI:

https://user-images.githubusercontent.com/591645/209090099-d5967675-1ea3-4d6c-982a-32a141411af3.mp4

Describe alternatives you've considered

I have been using the following workarounds for now:

  1. 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.
  2. same as above, but open a PR targeting the fork of the contributor instead of pushing to the branch directly.
  3. 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?).
  4. 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:

  1. This is tedious, and doesn't scale if the change to apply is large
  2. 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.
  3. This is a manual workflow that doesn't use Gitpod, which is long and tedious
  4. 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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by reproducing the 403 with git push origin branch-name from a Gitpod instance created from a pull request, then trace how the instance authenticates and configures the Git remote. Done means a maintainer with write access can push directly to the contributor's branch from the command line.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.