You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, we have this really cool way of cloning the branch of a PR from a fork.
This one click operation conveniently replaces a several step command line process.
Recently, GitHub also shipped the ability for collaborators working on a fork to allow authors on the target repository to push to their PR branch.
Desktop today doesn't support this. If I click "open this in GitHub Desktop" on a fork PR, make a change, and then try to push, it defaults to pushing to origin and not the fork branch.
Ideally, we would detect (I assume there's an API we can hit) if we actually have write access to the fork PR branch and if so, push to that instead. If the developer's intention is ambiguous, we could prompt asking where they would like to push.
Ideally, we would detect (I assume there's an API we can hit)
I'm not aware of this being made available with a preview API on the blog. There might be some new fields on the PR response that haven't landed in the developer docs but we'd also need to work out "are we a collaborator?" - or maybe that new field will do it for us.
Desktop does allow maintainers to push to collaborator forks of a particular repo. @outofambit and I tested it on #8934 with great success. And the problem of checking out a branch of a fork in Desktop is captured in #8509, Problem 5. I'll open up a separate issue for that to be more specific to the checkout of the PR branch from forks, but since the pushing operation is allowed, I'm going to close this.
Activity
haacked commentedon Oct 18, 2016
/cc @grokys @donokuda @shana @paladique as this applies to GitHub for Visual Studio as well.
shiftkey commentedon Oct 19, 2016
I'm not aware of this being made available with a preview API on the blog. There might be some new fields on the PR response that haven't landed in the developer docs but we'd also need to work out "are we a collaborator?" - or maybe that new field will do it for us.
haacked commentedon Oct 20, 2016
Guess we can ping our friends in platform such as @kdaigle to find out if such a field exists, and if not, could we get one.
shiftkey commentedon Feb 12, 2018
Bumping this because I think the upcoming 1.1 release (already on the beta channel) will address much of what was necessary here:
#3835 is an example of this.
There's probably some polish here:
maintainer_can_modifyflag on PRs that's returned by the Pull Request API, we don't look at that currentlypermissionshash returned by the repository API, which indicates what the current user can do with the repositorybillygriffin commentedon Jan 17, 2020
Desktop does allow maintainers to push to collaborator forks of a particular repo. @outofambit and I tested it on #8934 with great success. And the problem of checking out a branch of a fork in Desktop is captured in #8509, Problem 5. I'll open up a separate issue for that to be more specific to the checkout of the PR branch from forks, but since the pushing operation is allowed, I'm going to close this.