Merge Pull Request
PUT/api/v5/repos/:owner/:repo/pulls/:number/merge
Request
Path Parameters
owner stringrequired
Repository space address (organization or individual's address path)
repo stringrequired
Repository path (path)
number integerrequired
The ordinal number of the PR in this repository, i.e., which PR it is.
Example: 0
Query Parameters
access_token stringrequired
User authorization code
- application/json
Body
merge_methodstring
The optional methods to merge PRs, merge (merge all commits), rebase (rebase and merge). Default is merge.
titlestring
Optional. Merge title.
descriptionstring
Optional. Merge description.
force_mergeboolean
Is it mandatory to merge (requires enabling the "Allow Admins to Force Merge" setting, and requires admin permissions)
squashboolean
Is squash merge, default false
squash_commit_messagestring
Notes related to squash merge
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
shastring
mergedinteger
messagestring
{
"sha": "string",
"merged": 0,
"message": "string"
}
{
"sha": "c20ac9624d2811a9313af29769dcf581b60c3044",
"merged": true,
"message": "Pull Request has been successfully merged"
}