이 버전의 GitHub Enterprise는 다음 날짜에 중단되었습니다. 2024-07-09. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 더 뛰어난 성능, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise Server로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.
끌어오기 요청 검토에 대한 REST API 엔드포인트
REST API를 사용하여 끌어오기 요청 검토와 상호 작용합니다.
끌어오기 요청 검토 정보
끌어오기 요청 검토는 끌어오기 요청에 대한 끌어오기 요청 검토 주석 그룹이며 상태 및 선택적 본문 주석과 함께 그룹화됩니다.
List reviews for a pull request
Lists all reviews for a specified pull request. The list of reviews returns in chronological order.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"List reviews for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
속성, 형식, 설명 |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
"List reviews for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | The list of reviews returns in chronological order. |
"List reviews for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews
The list of reviews returns in chronological order.
Status: 200
[
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Here is the body for the review.",
"state": "APPROVED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}
]
Create a review for a pull request
Creates a review on a specified pull request.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."
Pull request reviews created in the 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."
Note: To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the application/vnd.github.v3.diff
media type to the Accept
header of a call to the Get a pull request endpoint.
The 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.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"Create a review for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
속성, 형식, 설명 | ||||||||
---|---|---|---|---|---|---|---|---|
commit_id string The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the | ||||||||
body string Required when using | ||||||||
event string The review action you want to perform. The review actions include: 다음 중 하나일 수 있습니다.: | ||||||||
comments array of objects Use the following table to specify the location, destination, and contents of the draft review comment. | ||||||||
Properties of |
속성, 형식, 설명 |
---|
path string RequiredThe relative path to the file that necessitates a review comment. |
position integer The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The |
body string RequiredText of the review comment. |
line integer |
side string |
start_line integer |
start_side string |
"Create a review for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
"Create a review for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews \
-d '{"commit_id":"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091","body":"This is close to perfect! Please address the suggested inline change.","event":"REQUEST_CHANGES","comments":[{"path":"file.md","position":6,"body":"Please add more information here, and fix this typo."}]}'
Response
Status: 200
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "This is close to perfect! Please address the suggested inline change.",
"state": "CHANGES_REQUESTED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}
Get a review for a pull request
Retrieves a pull request review by its ID.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"Get a review for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
review_id integer RequiredThe unique identifier of the review. |
"Get a review for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
"Get a review for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews/REVIEW_ID
Response
Status: 200
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Here is the body for the review.",
"state": "APPROVED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}
Update a review for a pull request
Updates the contents of a specified review summary comment.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"Update a review for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
review_id integer RequiredThe unique identifier of the review. |
속성, 형식, 설명 |
---|
body string RequiredThe body text of the pull request review. |
"Update a review for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
422 | Validation failed, or the endpoint has been spammed. |
"Update a review for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews/REVIEW_ID \
-d '{"body":"This is close to perfect! Please address the suggested inline change. And add more about this."}'
Response
Status: 200
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "This is close to perfect! Please address the suggested inline change. And add more about this.",
"state": "CHANGES_REQUESTED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}
Delete a pending review for a pull request
Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"Delete a pending review for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
review_id integer RequiredThe unique identifier of the review. |
"Delete a pending review for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Delete a pending review for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews/REVIEW_ID
Response
Status: 200
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "This is close to perfect! Please address the suggested inline change.",
"state": "CHANGES_REQUESTED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}
List comments for a pull request review
Lists comments for a specific pull request review.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"List comments for a pull request review"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
review_id integer RequiredThe unique identifier of the review. |
속성, 형식, 설명 |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." 기본값: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." 기본값: |
"List comments for a pull request review"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
"List comments for a pull request review"에 대한 코드 샘플
요청 예시
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews/REVIEW_ID/comments
Response
Status: 200
[
{
"url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/comments/1",
"pull_request_review_id": 42,
"id": 10,
"node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
"diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
"path": "file1.txt",
"position": 1,
"original_position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
"in_reply_to_id": 8,
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Great stuff!",
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/1",
"author_association": "NONE",
"_links": {
"self": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/1"
}
}
}
]
Dismiss a review for a pull request
Dismisses a specified review on a pull request.
Note: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"Dismiss a review for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
review_id integer RequiredThe unique identifier of the review. |
속성, 형식, 설명 |
---|
message string RequiredThe message for the pull request review dismissal |
event string 값: |
"Dismiss a review for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Dismiss a review for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews/REVIEW_ID/dismissals \
-d '{"message":"You are dismissed","event":"DISMISS"}'
Response
Status: 200
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Here is the body for the review.",
"state": "DISMISSED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}
Submit a review for a pull request
Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "Create a review for a pull request."
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github-commitcomment.raw+json
: Returns the raw markdown body. Response will includebody
. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json
: Returns a text only representation of the markdown body. Response will includebody_text
.application/vnd.github-commitcomment.html+json
: Returns HTML rendered from the body's markdown. Response will includebody_html
.application/vnd.github-commitcomment.full+json
: Returns raw, text, and HTML representations. Response will includebody
,body_text
, andbody_html
.
"Submit a review for a pull request"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
pull_number integer RequiredThe number that identifies the pull request. |
review_id integer RequiredThe unique identifier of the review. |
속성, 형식, 설명 |
---|
body string The body text of the pull request review |
event string RequiredThe review action you want to perform. The review actions include: 다음 중 하나일 수 있습니다.: |
"Submit a review for a pull request"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Submit a review for a pull request"에 대한 코드 샘플
요청 예시
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews/REVIEW_ID/events \
-d '{"body":"Here is the body for the review.","event":"REQUEST_CHANGES"}'
Response
Status: 200
{
"id": 80,
"node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=",
"user": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Here is the body for the review.",
"state": "APPROVED",
"html_url": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80",
"pull_request_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12",
"_links": {
"html": {
"href": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80"
},
"pull_request": {
"href": "https://HOSTNAME/repos/octocat/Hello-World/pulls/12"
}
},
"submitted_at": "2019-11-17T17:43:43Z",
"commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"author_association": "COLLABORATOR"
}