Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I modify someone else's pull request and push it back in its branch?

GitHub explains you can fork, modify, commit, push and trigger a pull request. They also explain that you can still modify, commit, push and the request is updated on the website.

I would like to know if it is possible to do the exact same thing but not being the author of the fork? I am the owner of a repo with pull requests I would like to correct myself but still discuss afterwards... I was trying to push my changes into the author's repo (thinking some right access would be calculated) but the access is denied.

like image 589
Julio Guerra Avatar asked Feb 08 '16 20:02

Julio Guerra


People also ask

Can you edit someone else's pull request?

You can make a comment on the Pull Request, telling them that their are some issues you'd like to fix before merging the Pull Request, and stating that you'd like them to give you permission to commit to their Pull Request branch by checking the "Allow edits from maintainers" checkbox on the Pull Request, and giving ...

Can a pull request be edited?

Under your repository name, click Pull requests. In the "Pull Requests" list, click the pull request you'd like to modify. Next to the pull request's title, click Edit.

How do you push changes to someone else's branch?

Push Branch to Another Branch In some cases, you may want to push your changes to another branch on the remote repository. In order to push your branch to another remote branch, use the “git push” command and specify the remote name, the name of your local branch as the name of the remote branch.


1 Answers

When creating a pull request (PR) on GitHub, you can select the option that maintainers are allowed to commit changes to your PR. You can also do this after the PR is already created: In the detail view of the PR, on the lower right, under "Unsubscribe", "participants". So if you want to commit to a PR of someone else on a GitHub repository you own: Ask them to give you this permission.

enter image description here

From the GitHub help pages: "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." (Allowing changes to a pull request branch created from a fork)

Unfortunately, as far as I know, in order for someone to commit to the PR, you would have to give them write access to the repository and can't just selectively give them write access to the PR.

like image 133
Sybille Peters Avatar answered Oct 20 '22 05:10

Sybille Peters