GitHub provides this feature of "Update Branch" whenever your PR is not rebased on top of master.
Is there a way to trigger this action via the REST API? I was playing around with https://developer.github.com/v3/pulls/#update-a-pull-request but nothing happened when using base: 'master'.
It turns out, I was actually asking the wrong question. Rebasing a PR consists of merging the current HEAD of master into your branch, which can be done via
octokit.repos.merge({
owner: pr.head.repo.owner.login,
repo: pr.head.repo.name,
base: pr.head.ref,
head: 'masters_HEAD_sha1',
commit_message: 'Merging master into this branch'
})
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