This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See "Abuse rate limits" for details.
PUT /repos/:owner/:repo/pulls/:pull_number/merge
| Name | Type | Description |
|---|---|---|
commit_title |
string |
Title for the automatic commit message. |
commit_message |
string |
Extra detail to append to automatic commit message. |
sha |
string |
SHA that pull request head must match to allow merge. |
merge_method |
string |
Merge method to use. Possible values are merge, squash or rebase. Default is merge. |
Status: 200 OK
{
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"merged": true,
"message": "Pull Request successfully merged"
}
Status: 405 Method not allowed
{
"message": "Pull Request is not mergeable",
"documentation_url": "https://developer.github.com/enterprise/2.20/v3/pulls/#merge-a-pull-request-merge-button"
}
Status: 409 Conflict
{
"message": "Head branch was modified. Review and try the merge again.",
"documentation_url": "https://developer.github.com/enterprise/2.20/v3/pulls/#merge-a-pull-request-merge-button"
}