I own a repository and someone has submitted a pull request. I want to make some changes to that pull request before bringing it in, is this possible to do?
Note, I'm expecting for my commits to show up in the pull request thread so that the conversation can continuem, etc.
I know that I could go off and clone his fork, and pull in my branch once I have finished but that doen't really fit with the workflow around discussion and improvement.
GitHub has added an ability to allow users with write permissions to the branch against which the PR is being raised to have write rights to the originating branch.
This is an opt-out feature, i.e.
Only pull request creators can give upstream repository maintainers, or those with push access to the upstream repository, permission to make commits to their pull request's compare branch.
[..]
Pull request creators can give these permissions on each of their pull requests when they initially create a pull request from a fork or after they have created the pull request.
https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/
Lets use this PR as an example, https://github.com/gajus/table/pull/19.
User epoberezkin created a pull request against gajus:master
. The origin of this request is epoberezkin:precompile-schemas
. Therefore, as a user with write-permissions to gajus:master
I can push to epoberezkin:precompile-schemas
branch and these changes will be reflected in the PR, i.e.
git clone [email protected]:gajus/table.git
cd table
git remote add epoberezkin [email protected]:epoberezkin/table.git
git fetch epoberezkin
git checkout epoberezkin/precompile-schemas
# Make changes, commit changes.
git push epoberezkin HEAD:precompile-schemas
If there's an open pull request on a repository that you own, only if you commit to the repository and branch (their repository and their branch) that has the open pull request will that work.
So.. you need to create a pull request to the forker's repo if you want to achieve literally what you've requested - that your commits appear in their pull request
You just need to
After pushing the changes you will see them in the Github pull request and the workflow will be respected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With