apicheats.dev Cheat sheet Raw .md
PUT

Try PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch — GitHub API

GitHub playground

Update a pull request branch

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

1 body fields
  • expected_head_sha · optional · 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](https://docs.github.com/rest/commits/commits#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.