Update a pull request
PATCH
/repos/{owner}/{repo}/pulls/{pull_number}
pulls
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.github.com/repos///pulls/' \
--header 'Content-Type: application/json' \
--data-raw '{
"base": "master",
"body": "updated body",
"state": "open",
"title": "new title"
}'
Response Response Example
200 - Example 1
{
"_links": {
"comments": {
"href": "string"
},
"commits": {
"href": "string"
},
"html": {
"href": "string"
},
"issue": {
"href": "string"
},
"review_comment": {
"href": "string"
},
"review_comments": {
"href": "string"
},
"self": {
"href": "string"
},
"statuses": {
"href": "string"
}
},
"active_lock_reason": "too heated",
"additions": 100,
"assignee": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"assignees": [
{
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
}
],
"author_association": "OWNER",
"auto_merge": {
"commit_message": "string",
"commit_title": "string",
"enabled_by": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"merge_method": "merge"
},
"base": {
"label": "string",
"ref": "string",
"repo": {
"allow_forking": true,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"archive_url": "string",
"archived": true,
"assignees_url": "string",
"blobs_url": "string",
"branches_url": "string",
"clone_url": "string",
"collaborators_url": "string",
"comments_url": "string",
"commits_url": "string",
"compare_url": "string",
"contents_url": "string",
"contributors_url": "http://example.com",
"created_at": "2019-08-24T14:15:22Z",
"default_branch": "string",
"deployments_url": "http://example.com",
"description": "string",
"disabled": true,
"downloads_url": "http://example.com",
"events_url": "http://example.com",
"fork": true,
"forks": 0,
"forks_count": 0,
"forks_url": "http://example.com",
"full_name": "string",
"git_commits_url": "string",
"git_refs_url": "string",
"git_tags_url": "string",
"git_url": "string",
"has_discussions": true,
"has_downloads": true,
"has_issues": true,
"has_pages": true,
"has_projects": true,
"has_wiki": true,
"homepage": "http://example.com",
"hooks_url": "http://example.com",
"html_url": "http://example.com",
"id": 0,
"is_template": true,
"issue_comment_url": "string",
"issue_events_url": "string",
"issues_url": "string",
"keys_url": "string",
"labels_url": "string",
"language": "string",
"languages_url": "http://example.com",
"license": {
"html_url": "http://example.com",
"key": "mit",
"name": "MIT License",
"node_id": "MDc6TGljZW5zZW1pdA==",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit"
},
"master_branch": "string",
"merges_url": "http://example.com",
"milestones_url": "string",
"mirror_url": "http://example.com",
"name": "string",
"node_id": "string",
"notifications_url": "string",
"open_issues": 0,
"open_issues_count": 0,
"owner": {
"avatar_url": "http://example.com",
"events_url": "string",
"followers_url": "http://example.com",
"following_url": "string",
"gists_url": "string",
"gravatar_id": "string",
"html_url": "http://example.com",
"id": 0,
"login": "string",
"node_id": "string",
"organizations_url": "http://example.com",
"received_events_url": "http://example.com",
"repos_url": "http://example.com",
"site_admin": true,
"starred_url": "string",
"subscriptions_url": "http://example.com",
"type": "string",
"url": "http://example.com"
},
"permissions": {
"admin": true,
"maintain": true,
"pull": true,
"push": true,
"triage": true
},
"private": true,
"pulls_url": "string",
"pushed_at": "2019-08-24T14:15:22Z",
"releases_url": "string",
"size": 0,
"ssh_url": "string",
"stargazers_count": 0,
"stargazers_url": "http://example.com",
"statuses_url": "string",
"subscribers_url": "http://example.com",
"subscription_url": "http://example.com",
"svn_url": "http://example.com",
"tags_url": "http://example.com",
"teams_url": "http://example.com",
"temp_clone_token": "string",
"topics": [
"string"
],
"trees_url": "string",
"updated_at": "2019-08-24T14:15:22Z",
"url": "http://example.com",
"visibility": "string",
"watchers": 0,
"watchers_count": 0,
"web_commit_signoff_required": true
},
"sha": "string",
"user": {
"avatar_url": "http://example.com",
"events_url": "string",
"followers_url": "http://example.com",
"following_url": "string",
"gists_url": "string",
"gravatar_id": "string",
"html_url": "http://example.com",
"id": 0,
"login": "string",
"node_id": "string",
"organizations_url": "http://example.com",
"received_events_url": "http://example.com",
"repos_url": "http://example.com",
"site_admin": true,
"starred_url": "string",
"subscriptions_url": "http://example.com",
"type": "string",
"url": "http://example.com"
}
},
"body": "Please pull these awesome changes",
"changed_files": 5,
"closed_at": "2011-01-26T19:01:12.000Z",
"comments": 10,
"comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments",
"commits": 3,
"commits_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits",
"created_at": "2011-01-26T19:01:12.000Z",
"deletions": 3,
"diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff",
"draft": false,
"head": {
"label": "string",
"ref": "string",
"repo": {
"allow_forking": true,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"archive_url": "string",
"archived": true,
"assignees_url": "string",
"blobs_url": "string",
"branches_url": "string",
"clone_url": "string",
"collaborators_url": "string",
"comments_url": "string",
"commits_url": "string",
"compare_url": "string",
"contents_url": "string",
"contributors_url": "http://example.com",
"created_at": "2019-08-24T14:15:22Z",
"default_branch": "string",
"deployments_url": "http://example.com",
"description": "string",
"disabled": true,
"downloads_url": "http://example.com",
"events_url": "http://example.com",
"fork": true,
"forks": 0,
"forks_count": 0,
"forks_url": "http://example.com",
"full_name": "string",
"git_commits_url": "string",
"git_refs_url": "string",
"git_tags_url": "string",
"git_url": "string",
"has_discussions": true,
"has_downloads": true,
"has_issues": true,
"has_pages": true,
"has_projects": true,
"has_wiki": true,
"homepage": "http://example.com",
"hooks_url": "http://example.com",
"html_url": "http://example.com",
"id": 0,
"is_template": true,
"issue_comment_url": "string",
"issue_events_url": "string",
"issues_url": "string",
"keys_url": "string",
"labels_url": "string",
"language": "string",
"languages_url": "http://example.com",
"license": {
"key": "string",
"name": "string",
"node_id": "string",
"spdx_id": "string",
"url": "http://example.com"
},
"master_branch": "string",
"merges_url": "http://example.com",
"milestones_url": "string",
"mirror_url": "http://example.com",
"name": "string",
"node_id": "string",
"notifications_url": "string",
"open_issues": 0,
"open_issues_count": 0,
"owner": {
"avatar_url": "http://example.com",
"events_url": "string",
"followers_url": "http://example.com",
"following_url": "string",
"gists_url": "string",
"gravatar_id": "string",
"html_url": "http://example.com",
"id": 0,
"login": "string",
"node_id": "string",
"organizations_url": "http://example.com",
"received_events_url": "http://example.com",
"repos_url": "http://example.com",
"site_admin": true,
"starred_url": "string",
"subscriptions_url": "http://example.com",
"type": "string",
"url": "http://example.com"
},
"permissions": {
"admin": true,
"maintain": true,
"pull": true,
"push": true,
"triage": true
},
"private": true,
"pulls_url": "string",
"pushed_at": "2019-08-24T14:15:22Z",
"releases_url": "string",
"size": 0,
"ssh_url": "string",
"stargazers_count": 0,
"stargazers_url": "http://example.com",
"statuses_url": "string",
"subscribers_url": "http://example.com",
"subscription_url": "http://example.com",
"svn_url": "http://example.com",
"tags_url": "http://example.com",
"teams_url": "http://example.com",
"temp_clone_token": "string",
"topics": [
"string"
],
"trees_url": "string",
"updated_at": "2019-08-24T14:15:22Z",
"url": "http://example.com",
"visibility": "string",
"watchers": 0,
"watchers_count": 0,
"web_commit_signoff_required": true
},
"sha": "string",
"user": {
"avatar_url": "http://example.com",
"events_url": "string",
"followers_url": "http://example.com",
"following_url": "string",
"gists_url": "string",
"gravatar_id": "string",
"html_url": "http://example.com",
"id": 0,
"login": "string",
"node_id": "string",
"organizations_url": "http://example.com",
"received_events_url": "http://example.com",
"repos_url": "http://example.com",
"site_admin": true,
"starred_url": "string",
"subscriptions_url": "http://example.com",
"type": "string",
"url": "http://example.com"
}
},
"html_url": "https://github.com/octocat/Hello-World/pull/1347",
"id": 1,
"issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"labels": [
{
"color": "string",
"default": true,
"description": "string",
"id": 0,
"name": "string",
"node_id": "string",
"url": "string"
}
],
"locked": true,
"maintainer_can_modify": true,
"merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6",
"mergeable": true,
"mergeable_state": "clean",
"merged": true,
"merged_at": "2011-01-26T19:01:12.000Z",
"merged_by": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"closed_at": "2013-02-12T13:22:01.000Z",
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31.000Z",
"creator": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"description": "Tracking milestone for version 1.0",
"due_on": "2012-10-09T23:39:01.000Z",
"html_url": "https://github.com/octocat/Hello-World/milestones/v1.0",
"id": 1002604,
"labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels",
"node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==",
"number": 42,
"open_issues": 4,
"state": "open",
"title": "v1.0",
"updated_at": "2014-03-03T18:58:10.000Z",
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1"
},
"node_id": "MDExOlB1bGxSZXF1ZXN0MQ==",
"number": 42,
"patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch",
"rebaseable": true,
"requested_reviewers": [
{
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
}
],
"requested_teams": [
{
"description": "A great team.",
"html_url": "https://github.com/orgs/rails/teams/core",
"id": 1,
"ldap_dn": "uid=example,ou=users,dc=github,dc=com",
"members_url": "https://api.github.com/organizations/1/team/1/members{/member}",
"name": "Justice League",
"node_id": "MDQ6VGVhbTE=",
"permission": "admin",
"privacy": "closed",
"repositories_url": "https://api.github.com/organizations/1/team/1/repos",
"slug": "justice-league",
"url": "https://api.github.com/organizations/1/team/1"
}
],
"review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}",
"review_comments": 0,
"review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments",
"state": "open",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"title": "Amazing new feature",
"updated_at": "2011-01-26T19:01:12.000Z",
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347",
"user": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
}
}
Request
Path Params
owner
stringÂ
required
repo
stringÂ
required
pull_number
integerÂ
required
Body Params application/json
Responses
Modified at 2023-08-15 02:59:30