Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

Equivalent of "Update Branch" via the API?

I have a small script that handles merging PRs into a repo. I add an "automerge" tag to PRs I want to get merged, and the script handles syncing one of the PRs with master, waiting for the checks to pass, merging, then repeating. The problem I am running into is that, when a pull request originates from a fork, the syncing step doesn't work. The account my script uses to merge master into the PR branch does not have write permissions on the fork, and so it is rejected. This isn't a problem when doing the merges manually, because PRs come with an "Update branch" button that works even for PRs from forks. I've looked and looked, but I can't find any equivalent to the "Update branch" functionality in the GitHub API, and so I am stuck with a merely partially automated merge process. Is there such a method? Plans for one?
1 Reply
Community Manager
Message 2 of 2

Re: Equivalent of "Update Branch" via the API?

Thanks for the feedback! I've taken your suggestion and passed it along to the appropriate teams. Thanks again for reaching out 😀

Thanks for being here, sharing, and keeping our community awesome!

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!