PENDING
state are not submitted and therefore do not include the submitted_at
property in the response. To create a pending review for a pull request, leave the event
parameter blank. For more information about submitting a PENDING
review, see "Submit a review for a pull request."application/vnd.github.v3.diff
media type. To see a pull request diff, add this media type to the Accept
header of a call to the single pull request endpoint.position
value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.curl --location --request POST 'https://api.github.com/repos///pulls//reviews' \
--header 'Content-Type: application/json' \
--data-raw '{
"body": "This is close to perfect! Please address the suggested inline change.",
"comments": [
{
"body": "Please add more information here, and fix this typo.",
"path": "file.md",
"position": 6
}
],
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"event": "REQUEST_CHANGES"
}'
{
"_links": {
"html": {
"href": "string"
},
"pull_request": {
"href": "string"
}
},
"author_association": "OWNER",
"body": "This looks great.",
"body_html": "string",
"body_text": "string",
"commit_id": "54bb654c9e6025347f57900a4a5c2313a96b8035",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"id": 42,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/12",
"state": "CHANGES_REQUESTED",
"submitted_at": "2019-08-24T14:15:22Z",
"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_CHANGES
or COMMENT
for the event
parameter. The body text of the pull request review.