Note: Updating the pull request branch with latest upstream changes is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.lydian-preview+json
Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact GitHub Support or GitHub Premium Support.
Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
PUT /repos/:owner/:repo/pulls/:pull_number/update-branch
| Name | Type | Description |
|---|---|---|
expected_head_sha |
string |
The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the "List commits on a repository" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. |
{
"expected_head_sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
Status: 202 Accepted
{
"message": "Updating pull request branch.",
"url": "https://github.com/repos/octocat/Hello-World/pulls/53"
}