Merge a pull request
This endpoint triggers [notifications](https://docs.github.com/[email protected]/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/[email protected]/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/[email protected]/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
/repos/{owner}/{repo}/pulls/{pull_number}/merge- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- pull_number integerrequired
Body Params
optionalExtra detail to append to automatic commit message.
Title for the automatic commit message.
Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`.
SHA that pull request head must match to allow merge.
Responses
if merge was successful
Forbidden
Resource not found
Method Not Allowed if merge cannot be performed
Conflict if sha was provided and pull request head did not match
Validation failed