GitHub v3 REST API

Check if a pull request has been merged

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/merge

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Response

Response if pull request has been merged

get/repos/{owner}/{repo}/pulls/{pull_number}/merge
 

Merge a pull request

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.

put
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/merge

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Body

application/json
commit_titlestring

Title for the automatic commit message.

commit_messagestring

Extra detail to append to automatic commit message.

shastring

SHA that pull request head must match to allow merge.

merge_methodstring

Merge method to use. Possible values are merge, squash or rebase. Default is merge.

Allowed values:mergesquashrebase

Response

application/json

if merge was successful

Pull Request Merge Result

Pull Request Merge Result

shastringrequired
mergedbooleanrequired
messagestringrequired
put/repos/{owner}/{repo}/pulls/{pull_number}/merge

Body

{}
 
application/json

List requested reviewers for a pull request

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Response

200 application/json

Response

Pull Request Review Request

Pull Request Review Request

usersarray[object]required

Simple User

Show Child Parameters
teamsarray[object]required

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
get/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
 
200 application/json

Request reviewers for a pull request

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.

post
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Body

application/json
Any Of

Response

application/json

Response

Pull Request Simple

Pull Request Simple

urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1347

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOlB1bGxSZXF1ZXN0MQ==

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347

diff_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.diff

patch_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.patch

issue_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347

commits_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits

review_comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments

review_comment_urlstringrequired

Example:https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}

comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347/comments

statuses_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e

numberintegerrequired

Example:1347

statestringrequired

Example:open

lockedbooleanrequired

Example:true

titlestringrequired

Example:new-feature

userobject | nullrequired

Simple User

Show Child Parameters
bodystring | nullrequired

Example:Please pull these awesome changes

labelsarray[object]required
Show Child Parameters
milestoneobject | nullrequired

A collection of related issues and pull requests.

Show Child Parameters
active_lock_reasonstring | null

Example:too heated

created_atstring(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring(date-time)required

Example:2011-01-26T19:01:12Z

closed_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merged_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merge_commit_shastring | nullrequired

Example:e5bd3914e2e596debea16f433f57875b5b90bcd6

assigneeobject | nullrequired

Simple User

Show Child Parameters
assigneesarray | null[object]

Simple User

Show Child Parameters
requested_reviewersarray | null[object]

Simple User

Show Child Parameters
requested_teamsarray | null[object]

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
headobjectrequired
Show Child Parameters
baseobjectrequired
Show Child Parameters
_linksobjectrequired
Show Child Parameters
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

draftboolean

Indicates whether or not the pull request is a draft.

Example:false

post/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers

Body

{ "reviewers": [ "octocat", "hubot", "other_user" ], "team_reviewers": [ "justice-league" ] }
 
application/json

Remove requested reviewers from a pull request

delete
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Body

application/json
reviewersarray[string]required

An array of user logins that will be removed.

team_reviewersarray[string]

An array of team slugs that will be removed.

Response

application/json

Response

Pull Request Simple

Pull Request Simple

urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1347

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOlB1bGxSZXF1ZXN0MQ==

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347

diff_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.diff

patch_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.patch

issue_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347

commits_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits

review_comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments

review_comment_urlstringrequired

Example:https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}

comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347/comments

statuses_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e

numberintegerrequired

Example:1347

statestringrequired

Example:open

lockedbooleanrequired

Example:true

titlestringrequired

Example:new-feature

userobject | nullrequired

Simple User

Show Child Parameters
bodystring | nullrequired

Example:Please pull these awesome changes

labelsarray[object]required
Show Child Parameters
milestoneobject | nullrequired

A collection of related issues and pull requests.

Show Child Parameters
active_lock_reasonstring | null

Example:too heated

created_atstring(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring(date-time)required

Example:2011-01-26T19:01:12Z

closed_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merged_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merge_commit_shastring | nullrequired

Example:e5bd3914e2e596debea16f433f57875b5b90bcd6

assigneeobject | nullrequired

Simple User

Show Child Parameters
assigneesarray | null[object]

Simple User

Show Child Parameters
requested_reviewersarray | null[object]

Simple User

Show Child Parameters
requested_teamsarray | null[object]

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
headobjectrequired
Show Child Parameters
baseobjectrequired
Show Child Parameters
_linksobjectrequired
Show Child Parameters
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

draftboolean

Indicates whether or not the pull request is a draft.

Example:false

delete/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers

Body

{ "reviewers": [ "octocat", "hubot", "other_user" ], "team_reviewers": [ "justice-league" ] }
 
application/json