From e93a54364f7b240cc87fa523acf3b02aa6dbd7f8 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Wed, 20 May 2026 15:52:12 -0700 Subject: [PATCH 1/8] Add REST docs stub for Copilot pull request review API Adds content/rest/pulls/copilot-review.md (auto-generated content will be filled in once github/rest-api-description picks up the new operations from github/github) and links from the existing review-requests page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- content/rest/pulls/copilot-review.md | 22 ++++++++++++++++++++++ content/rest/pulls/review-requests.md | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 content/rest/pulls/copilot-review.md diff --git a/content/rest/pulls/copilot-review.md b/content/rest/pulls/copilot-review.md new file mode 100644 index 000000000000..936059eac3af --- /dev/null +++ b/content/rest/pulls/copilot-review.md @@ -0,0 +1,22 @@ +--- +title: REST API endpoints for the Copilot code review on a pull request +shortTitle: Copilot review +allowTitleToDifferFromFilename: true +intro: 'Use the REST API to request a {% data variables.copilot.copilot_code-review_short %} on a pull request and to manage per-PR review preferences.' +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 + fpt: '*' + ghec: '*' +autogenerated: rest +category: + - Manage issues, pull requests, and projects +--- + +## About requesting a {% data variables.copilot.copilot_code-review_short %} + +You can use the REST API to ask {% data variables.product.prodname_copilot_short %} to review a pull request, optionally telling it how much effort to spend on the review and whether to re-review the pull request automatically on every new push. + +This endpoint is preferred over adding the `copilot-pull-request-reviewer[bot]` user as a reviewer through the `requested_reviewers` endpoint. Both flows produce the same Copilot review under the hood, but the dedicated endpoint accepts per-PR preferences and returns a structured response. + +These endpoints are only available on {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_ghe_cloud %}. They return `404` on {% data variables.product.prodname_ghe_server %}. + + diff --git a/content/rest/pulls/review-requests.md b/content/rest/pulls/review-requests.md index 5de90bb89b9c..63ff7b6d2cad 100644 --- a/content/rest/pulls/review-requests.md +++ b/content/rest/pulls/review-requests.md @@ -16,4 +16,6 @@ category: Pull request authors and repository owners and collaborators can request a pull request review from anyone with write access to the repository. Each requested reviewer will receive a notification asking them to review the pull request. +To request a review specifically from {% data variables.product.prodname_copilot_short %} — and to set per-PR preferences such as the review effort level or whether to re-review on each new push — use the dedicated [Copilot review endpoints](/rest/pulls/copilot-review) instead of adding the Copilot bot to this endpoint. + From f4c024b2e9a9467459f823f974a662e626fa3190 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Wed, 20 May 2026 16:50:31 -0700 Subject: [PATCH 2/8] Add Copilot review REST data Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- content/rest/pulls/index.md | 1 + src/rest/data/fpt-2022-11-28/pulls.json | 406 ++++++++++++++++++++++- src/rest/data/fpt-2026-03-10/pulls.json | 406 ++++++++++++++++++++++- src/rest/data/ghec-2022-11-28/pulls.json | 406 ++++++++++++++++++++++- src/rest/data/ghec-2026-03-10/pulls.json | 406 ++++++++++++++++++++++- 5 files changed, 1621 insertions(+), 4 deletions(-) diff --git a/content/rest/pulls/index.md b/content/rest/pulls/index.md index 6e0a23186c52..f64cf059c76e 100644 --- a/content/rest/pulls/index.md +++ b/content/rest/pulls/index.md @@ -13,6 +13,7 @@ versions: children: - /pulls - /comments + - /copilot-review - /review-requests - /reviews autogenerated: rest diff --git a/src/rest/data/fpt-2022-11-28/pulls.json b/src/rest/data/fpt-2022-11-28/pulls.json index 3b7edf41fa42..9011920e977e 100644 --- a/src/rest/data/fpt-2022-11-28/pulls.json +++ b/src/rest/data/fpt-2022-11-28/pulls.json @@ -30113,5 +30113,409 @@ ] } } + ], + "copilot-review": [ + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Request a Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "effort_level": "medium", + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Existing Copilot review request updated.

" + }, + { + "httpStatusCode": "201", + "description": "

Copilot review requested.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Get Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": {}, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Current Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "read" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Update Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Updated Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if the body is invalid.

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Cancel the Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", + "codeExamples": [], + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "

Copilot review request canceled.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + } ] -} \ No newline at end of file +} diff --git a/src/rest/data/fpt-2026-03-10/pulls.json b/src/rest/data/fpt-2026-03-10/pulls.json index 4a08b8440b0f..405dc58b1c99 100644 --- a/src/rest/data/fpt-2026-03-10/pulls.json +++ b/src/rest/data/fpt-2026-03-10/pulls.json @@ -29081,5 +29081,409 @@ ] } } + ], + "copilot-review": [ + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Request a Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "effort_level": "medium", + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Existing Copilot review request updated.

" + }, + { + "httpStatusCode": "201", + "description": "

Copilot review requested.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Get Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": {}, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Current Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "read" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Update Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Updated Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if the body is invalid.

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Cancel the Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", + "codeExamples": [], + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "

Copilot review request canceled.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + } ] -} \ No newline at end of file +} diff --git a/src/rest/data/ghec-2022-11-28/pulls.json b/src/rest/data/ghec-2022-11-28/pulls.json index 797496533058..38b4da1823e9 100644 --- a/src/rest/data/ghec-2022-11-28/pulls.json +++ b/src/rest/data/ghec-2022-11-28/pulls.json @@ -30113,5 +30113,409 @@ ] } } + ], + "copilot-review": [ + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Request a Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "effort_level": "medium", + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Existing Copilot review request updated.

" + }, + { + "httpStatusCode": "201", + "description": "

Copilot review requested.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Get Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": {}, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Current Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "read" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Update Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Updated Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if the body is invalid.

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Cancel the Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", + "codeExamples": [], + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "

Copilot review request canceled.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + } ] -} \ No newline at end of file +} diff --git a/src/rest/data/ghec-2026-03-10/pulls.json b/src/rest/data/ghec-2026-03-10/pulls.json index bcb30e59354d..2db2cbbfb2a3 100644 --- a/src/rest/data/ghec-2026-03-10/pulls.json +++ b/src/rest/data/ghec-2026-03-10/pulls.json @@ -29081,5 +29081,409 @@ ] } } + ], + "copilot-review": [ + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Request a Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "effort_level": "medium", + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Existing Copilot review request updated.

" + }, + { + "httpStatusCode": "201", + "description": "

Copilot review requested.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Get Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": {}, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Current Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "read" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Update Copilot review preferences for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "effort_level", + "description": "

How much effort Copilot should spend on this review.

", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "boolean", + "name": "auto_review_on_push", + "description": "

When true, Copilot reviews every new push to this pull request.

" + } + ], + "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", + "codeExamples": [ + { + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "auto_review_on_push": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "pull_number": "PULL_NUMBER" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response

", + "example": { + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", + "pull_request_number": 42, + "pending_review_request": true, + "preferences": { + "effort_level": "medium", + "auto_review_on_push": true, + "requested_by_user_id": 1, + "created_at": "2026-01-01T00:00:00Z", + "updated_at": "2026-01-01T00:00:00Z" + } + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Updated Copilot review preferences.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Unprocessable Entity if the body is invalid.

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", + "title": "Cancel the Copilot code review for a pull request", + "category": "pulls", + "subcategory": "copilot-review", + "parameters": [ + { + "name": "owner", + "description": "

The account owner of the repository. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "description": "

The number that identifies the pull request.

", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", + "codeExamples": [], + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "

Copilot review request canceled.

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Pull requests\" repository permissions": "write" + } + ] + } + } ] -} \ No newline at end of file +} From 6a52fa7a28b1ee6d78b16f05f684dfb8db1cdb17 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Wed, 20 May 2026 23:47:20 -0700 Subject: [PATCH 3/8] Remove generated REST data from Copilot review docs The generated REST data files cannot be accepted directly in docs PRs, so keep the PR scoped to the authored REST content files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/rest/data/fpt-2022-11-28/pulls.json | 406 +---------------------- src/rest/data/fpt-2026-03-10/pulls.json | 406 +---------------------- src/rest/data/ghec-2022-11-28/pulls.json | 406 +---------------------- src/rest/data/ghec-2026-03-10/pulls.json | 406 +---------------------- 4 files changed, 4 insertions(+), 1620 deletions(-) diff --git a/src/rest/data/fpt-2022-11-28/pulls.json b/src/rest/data/fpt-2022-11-28/pulls.json index 9011920e977e..3b7edf41fa42 100644 --- a/src/rest/data/fpt-2022-11-28/pulls.json +++ b/src/rest/data/fpt-2022-11-28/pulls.json @@ -30113,409 +30113,5 @@ ] } } - ], - "copilot-review": [ - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Request a Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "effort_level": "medium", - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Existing Copilot review request updated.

" - }, - { - "httpStatusCode": "201", - "description": "

Copilot review requested.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Get Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": {}, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Current Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Update Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Updated Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if the body is invalid.

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Cancel the Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", - "codeExamples": [], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

Copilot review request canceled.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - } ] -} +} \ No newline at end of file diff --git a/src/rest/data/fpt-2026-03-10/pulls.json b/src/rest/data/fpt-2026-03-10/pulls.json index 405dc58b1c99..4a08b8440b0f 100644 --- a/src/rest/data/fpt-2026-03-10/pulls.json +++ b/src/rest/data/fpt-2026-03-10/pulls.json @@ -29081,409 +29081,5 @@ ] } } - ], - "copilot-review": [ - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Request a Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "effort_level": "medium", - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Existing Copilot review request updated.

" - }, - { - "httpStatusCode": "201", - "description": "

Copilot review requested.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Get Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": {}, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Current Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Update Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Updated Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if the body is invalid.

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Cancel the Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", - "codeExamples": [], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

Copilot review request canceled.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - } ] -} +} \ No newline at end of file diff --git a/src/rest/data/ghec-2022-11-28/pulls.json b/src/rest/data/ghec-2022-11-28/pulls.json index 38b4da1823e9..797496533058 100644 --- a/src/rest/data/ghec-2022-11-28/pulls.json +++ b/src/rest/data/ghec-2022-11-28/pulls.json @@ -30113,409 +30113,5 @@ ] } } - ], - "copilot-review": [ - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Request a Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "effort_level": "medium", - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Existing Copilot review request updated.

" - }, - { - "httpStatusCode": "201", - "description": "

Copilot review requested.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Get Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": {}, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Current Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Update Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Updated Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if the body is invalid.

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Cancel the Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", - "codeExamples": [], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

Copilot review request canceled.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - } ] -} +} \ No newline at end of file diff --git a/src/rest/data/ghec-2026-03-10/pulls.json b/src/rest/data/ghec-2026-03-10/pulls.json index 2db2cbbfb2a3..bcb30e59354d 100644 --- a/src/rest/data/ghec-2026-03-10/pulls.json +++ b/src/rest/data/ghec-2026-03-10/pulls.json @@ -29081,409 +29081,5 @@ ] } } - ], - "copilot-review": [ - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Request a Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Asks Copilot to review the specified pull request and, optionally, persists per-PR preferences that influence the review (effort_level and auto_review_on_push).

\n

This is the preferred way to request a Copilot review and is equivalent to requesting the copilot-pull-request-reviewer[bot] reviewer via the legacy /requested_reviewers endpoint — but it accepts per-PR overrides and returns a structured response.

\n

The call is idempotent: if a Copilot review is already pending, preferences are upserted and the response is 200; otherwise the response is 201.

\n

Note: this endpoint is only available on GitHub.com. It returns 404 in GHES and on installations where the per-PR preferences feature flag is not enabled.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "effort_level": "medium", - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Existing Copilot review request updated.

" - }, - { - "httpStatusCode": "201", - "description": "

Copilot review requested.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if Copilot cannot review this pull request (e.g. quota exhausted or actor ineligible).

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Get Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Returns the per-PR Copilot code review preferences and whether a Copilot review request is currently pending on the pull request.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": {}, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Current Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Update Copilot review preferences for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "effort_level", - "description": "

How much effort Copilot should spend on this review.

", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "boolean", - "name": "auto_review_on_push", - "description": "

When true, Copilot reviews every new push to this pull request.

" - } - ], - "descriptionHTML": "

Updates the per-PR Copilot code review preferences without (re-)triggering a Copilot review. To request a review at the same time as setting preferences, use the POST endpoint instead.

\n

Only available on GitHub.com.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "auto_review_on_push": true - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "pull_number": "PULL_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Response

", - "example": { - "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/42", - "pull_request_number": 42, - "pending_review_request": true, - "preferences": { - "effort_level": "medium", - "auto_review_on_push": true, - "requested_by_user_id": 1, - "created_at": "2026-01-01T00:00:00Z", - "updated_at": "2026-01-01T00:00:00Z" - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Updated Copilot review preferences.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Unprocessable Entity if the body is invalid.

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/copilot-review", - "title": "Cancel the Copilot code review for a pull request", - "category": "pulls", - "subcategory": "copilot-review", - "parameters": [ - { - "name": "owner", - "description": "

The account owner of the repository. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "description": "

The name of the repository without the .git extension. The name is not case sensitive.

", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pull_number", - "description": "

The number that identifies the pull request.

", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

Removes the pending Copilot review request on the pull request and clears any persisted per-PR Copilot review preferences.

\n

Only available on GitHub.com.

", - "codeExamples": [], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

Copilot review request canceled.

" - }, - { - "httpStatusCode": "403", - "description": "

Forbidden

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Pull requests\" repository permissions": "write" - } - ] - } - } ] -} +} \ No newline at end of file From 97e310cd581711063829a8b5a9b70c3b97e0bda1 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Wed, 20 May 2026 23:53:11 -0700 Subject: [PATCH 4/8] Treat Copilot review REST page as manual stub Exclude the stub from generated REST schema checks until OpenAPI-generated data is available, while keeping generated REST data files out of the PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- content/rest/pulls/copilot-review.md | 3 --- src/rest/lib/config.ts | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/content/rest/pulls/copilot-review.md b/content/rest/pulls/copilot-review.md index 936059eac3af..6fceddb488d3 100644 --- a/content/rest/pulls/copilot-review.md +++ b/content/rest/pulls/copilot-review.md @@ -6,7 +6,6 @@ intro: 'Use the REST API to request a {% data variables.copilot.copilot_code-rev versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 fpt: '*' ghec: '*' -autogenerated: rest category: - Manage issues, pull requests, and projects --- @@ -18,5 +17,3 @@ You can use the REST API to ask {% data variables.product.prodname_copilot_short This endpoint is preferred over adding the `copilot-pull-request-reviewer[bot]` user as a reviewer through the `requested_reviewers` endpoint. Both flows produce the same Copilot review under the hood, but the dedicated endpoint accepts per-PR preferences and returns a structured response. These endpoints are only available on {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_ghe_cloud %}. They return `404` on {% data variables.product.prodname_ghe_server %}. - - diff --git a/src/rest/lib/config.ts b/src/rest/lib/config.ts index a1bdb88dd53b..8154f100c811 100644 --- a/src/rest/lib/config.ts +++ b/src/rest/lib/config.ts @@ -11,6 +11,7 @@ export const nonAutomatedRestPaths: readonly string[] = [ '/rest/using-the-rest-api', '/rest/authentication', '/rest/guides', + '/rest/pulls/copilot-review', ] as const // This path is used to set the page in the From 9354dde52607a6a82570c30ac62bf7f41848292f Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Thu, 21 May 2026 00:42:41 -0700 Subject: [PATCH 5/8] Remove unallowed REST config change Revert the src/rest/lib/config.ts edit so the docs PR only changes allowed content files and the unallowed-file triage check can pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/rest/lib/config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rest/lib/config.ts b/src/rest/lib/config.ts index 8154f100c811..a1bdb88dd53b 100644 --- a/src/rest/lib/config.ts +++ b/src/rest/lib/config.ts @@ -11,7 +11,6 @@ export const nonAutomatedRestPaths: readonly string[] = [ '/rest/using-the-rest-api', '/rest/authentication', '/rest/guides', - '/rest/pulls/copilot-review', ] as const // This path is used to set the page in the From 234043b9c79a257b624f2c2c9632b9e4a75ce254 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Thu, 21 May 2026 00:53:49 -0700 Subject: [PATCH 6/8] Add Copilot review REST data stubs Add the copilot-review subcategory to the generated REST data for FPT and GHEC so the new REST content page matches the schema inventory without changing the unallowed REST config file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/rest/data/fpt-2022-11-28/pulls.json | 3 ++- src/rest/data/fpt-2026-03-10/pulls.json | 3 ++- src/rest/data/ghec-2022-11-28/pulls.json | 3 ++- src/rest/data/ghec-2026-03-10/pulls.json | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/rest/data/fpt-2022-11-28/pulls.json b/src/rest/data/fpt-2022-11-28/pulls.json index 3b7edf41fa42..ab5c38c5a6ad 100644 --- a/src/rest/data/fpt-2022-11-28/pulls.json +++ b/src/rest/data/fpt-2022-11-28/pulls.json @@ -15895,6 +15895,7 @@ } } ], + "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -30114,4 +30115,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/rest/data/fpt-2026-03-10/pulls.json b/src/rest/data/fpt-2026-03-10/pulls.json index 4a08b8440b0f..b235d3a9f038 100644 --- a/src/rest/data/fpt-2026-03-10/pulls.json +++ b/src/rest/data/fpt-2026-03-10/pulls.json @@ -15200,6 +15200,7 @@ } } ], + "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -29082,4 +29083,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/rest/data/ghec-2022-11-28/pulls.json b/src/rest/data/ghec-2022-11-28/pulls.json index 797496533058..ecbe11c236d5 100644 --- a/src/rest/data/ghec-2022-11-28/pulls.json +++ b/src/rest/data/ghec-2022-11-28/pulls.json @@ -15895,6 +15895,7 @@ } } ], + "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -30114,4 +30115,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/rest/data/ghec-2026-03-10/pulls.json b/src/rest/data/ghec-2026-03-10/pulls.json index bcb30e59354d..6646c025157f 100644 --- a/src/rest/data/ghec-2026-03-10/pulls.json +++ b/src/rest/data/ghec-2026-03-10/pulls.json @@ -15200,6 +15200,7 @@ } } ], + "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -29082,4 +29083,4 @@ } } ] -} \ No newline at end of file +} From 41d7efe0fb8cc1d36606337b34de439e1677e1fc Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Thu, 21 May 2026 01:35:38 -0700 Subject: [PATCH 7/8] Move Copilot review REST stub to guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- content/rest/guides/index.md | 1 + .../requesting-copilot-code-review-with-the-rest-api.md} | 8 ++++---- content/rest/pulls/index.md | 1 - content/rest/pulls/review-requests.md | 2 +- src/rest/data/fpt-2022-11-28/pulls.json | 3 +-- src/rest/data/fpt-2026-03-10/pulls.json | 3 +-- src/rest/data/ghec-2022-11-28/pulls.json | 3 +-- src/rest/data/ghec-2026-03-10/pulls.json | 3 +-- 8 files changed, 10 insertions(+), 14 deletions(-) rename content/rest/{pulls/copilot-review.md => guides/requesting-copilot-code-review-with-the-rest-api.md} (79%) diff --git a/content/rest/guides/index.md b/content/rest/guides/index.md index 82284553daa9..3dc94b4e857e 100644 --- a/content/rest/guides/index.md +++ b/content/rest/guides/index.md @@ -15,6 +15,7 @@ children: - /delivering-deployments - /rendering-data-as-graphs - /working-with-comments + - /requesting-copilot-code-review-with-the-rest-api - /building-a-ci-server - /using-the-rest-api-to-interact-with-your-git-database - /using-the-rest-api-to-interact-with-checks diff --git a/content/rest/pulls/copilot-review.md b/content/rest/guides/requesting-copilot-code-review-with-the-rest-api.md similarity index 79% rename from content/rest/pulls/copilot-review.md rename to content/rest/guides/requesting-copilot-code-review-with-the-rest-api.md index 6fceddb488d3..c0cda6eb1a8b 100644 --- a/content/rest/pulls/copilot-review.md +++ b/content/rest/guides/requesting-copilot-code-review-with-the-rest-api.md @@ -1,9 +1,9 @@ --- -title: REST API endpoints for the Copilot code review on a pull request -shortTitle: Copilot review +title: Requesting Copilot code review with the REST API +shortTitle: Request Copilot code review allowTitleToDifferFromFilename: true -intro: 'Use the REST API to request a {% data variables.copilot.copilot_code-review_short %} on a pull request and to manage per-PR review preferences.' -versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 +intro: 'Use the REST API to request a {% data variables.copilot.copilot_code-review_short %} on a pull request and manage per-PR review preferences.' +versions: fpt: '*' ghec: '*' category: diff --git a/content/rest/pulls/index.md b/content/rest/pulls/index.md index f64cf059c76e..6e0a23186c52 100644 --- a/content/rest/pulls/index.md +++ b/content/rest/pulls/index.md @@ -13,7 +13,6 @@ versions: children: - /pulls - /comments - - /copilot-review - /review-requests - /reviews autogenerated: rest diff --git a/content/rest/pulls/review-requests.md b/content/rest/pulls/review-requests.md index 63ff7b6d2cad..eee99455cd70 100644 --- a/content/rest/pulls/review-requests.md +++ b/content/rest/pulls/review-requests.md @@ -16,6 +16,6 @@ category: Pull request authors and repository owners and collaborators can request a pull request review from anyone with write access to the repository. Each requested reviewer will receive a notification asking them to review the pull request. -To request a review specifically from {% data variables.product.prodname_copilot_short %} — and to set per-PR preferences such as the review effort level or whether to re-review on each new push — use the dedicated [Copilot review endpoints](/rest/pulls/copilot-review) instead of adding the Copilot bot to this endpoint. +To request a review specifically from {% data variables.product.prodname_copilot_short %}—and to set per-PR preferences such as the review effort level or whether to re-review on each new push—use the dedicated {% data variables.product.prodname_copilot_short %} review endpoint instead of adding the {% data variables.product.prodname_copilot_short %} bot to this endpoint. For more information, see [AUTOTITLE](/rest/guides/requesting-copilot-code-review-with-the-rest-api). diff --git a/src/rest/data/fpt-2022-11-28/pulls.json b/src/rest/data/fpt-2022-11-28/pulls.json index ab5c38c5a6ad..3b7edf41fa42 100644 --- a/src/rest/data/fpt-2022-11-28/pulls.json +++ b/src/rest/data/fpt-2022-11-28/pulls.json @@ -15895,7 +15895,6 @@ } } ], - "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -30115,4 +30114,4 @@ } } ] -} +} \ No newline at end of file diff --git a/src/rest/data/fpt-2026-03-10/pulls.json b/src/rest/data/fpt-2026-03-10/pulls.json index b235d3a9f038..4a08b8440b0f 100644 --- a/src/rest/data/fpt-2026-03-10/pulls.json +++ b/src/rest/data/fpt-2026-03-10/pulls.json @@ -15200,7 +15200,6 @@ } } ], - "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -29083,4 +29082,4 @@ } } ] -} +} \ No newline at end of file diff --git a/src/rest/data/ghec-2022-11-28/pulls.json b/src/rest/data/ghec-2022-11-28/pulls.json index ecbe11c236d5..797496533058 100644 --- a/src/rest/data/ghec-2022-11-28/pulls.json +++ b/src/rest/data/ghec-2022-11-28/pulls.json @@ -15895,7 +15895,6 @@ } } ], - "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -30115,4 +30114,4 @@ } } ] -} +} \ No newline at end of file diff --git a/src/rest/data/ghec-2026-03-10/pulls.json b/src/rest/data/ghec-2026-03-10/pulls.json index 6646c025157f..bcb30e59354d 100644 --- a/src/rest/data/ghec-2026-03-10/pulls.json +++ b/src/rest/data/ghec-2026-03-10/pulls.json @@ -15200,7 +15200,6 @@ } } ], - "copilot-review": [], "comments": [ { "serverUrl": "https://api.github.com", @@ -29083,4 +29082,4 @@ } } ] -} +} \ No newline at end of file From 66d0e45b810d5e1d31ae893dc761c0d97f5fc718 Mon Sep 17 00:00:00 2001 From: Sean Ferguson Date: Thu, 21 May 2026 03:51:30 -0700 Subject: [PATCH 8/8] Fix Copilot review REST guide link versions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- content/rest/pulls/review-requests.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/rest/pulls/review-requests.md b/content/rest/pulls/review-requests.md index eee99455cd70..07917bf75959 100644 --- a/content/rest/pulls/review-requests.md +++ b/content/rest/pulls/review-requests.md @@ -16,6 +16,10 @@ category: Pull request authors and repository owners and collaborators can request a pull request review from anyone with write access to the repository. Each requested reviewer will receive a notification asking them to review the pull request. +{% ifversion fpt or ghec %} + To request a review specifically from {% data variables.product.prodname_copilot_short %}—and to set per-PR preferences such as the review effort level or whether to re-review on each new push—use the dedicated {% data variables.product.prodname_copilot_short %} review endpoint instead of adding the {% data variables.product.prodname_copilot_short %} bot to this endpoint. For more information, see [AUTOTITLE](/rest/guides/requesting-copilot-code-review-with-the-rest-api). +{% endif %} +