Title says it all…
Anyone have any code to update the base branch for a github pull request programmatically? Don't really care about the language.
The API method to change the base branch of a PR (Pull Request) is described here:
GitHub recently (August 2016, less than 2 years ago at the time of writing this) added the ability to change the base branch on a Pull Request after it's created.
Now we're updating the Pull Request API to enable the new functionality.For example:
curl "https://api.github.com/repos/github/hubot/pulls/123" \
-H 'Authorization: token TOKEN' \
-d '{ "base": "master" }'
The Pull Request base will be updated to point to the
master
branch.
You can embed that curl
call in any script language you want.