Skip to content
1 change: 1 addition & 0 deletions content/rest/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
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 manage per-PR review preferences.'
versions:
fpt: '*'
ghec: '*'
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 %}.
6 changes: 6 additions & 0 deletions content/rest/pulls/review-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +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 %}

<!-- Content after this section is automatically generated -->
Loading