octokit.rest

Update a pull request branch

Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.

lydian Preview (required)

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

Parameters

string The token will be passed in the authorization header.

string

string

integer

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" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.

Request

PUT https://api.github.com/repos///pulls//update-branch
authorization: bearer undefined
accept: application/vnd.github.v3+json
user-agent: octokit.rest
content-length: 0


Example Response

Status: 202
{
  "message": "Updating pull request branch.",
  "url": "https://github.com/repos/octocat/Hello-World/pulls/53"
}

See documentation on GitHub developer guides