Skip to content
19 changes: 19 additions & 0 deletions content/rest/pulls/copilot-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
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: '*'
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 %}.
1 change: 1 addition & 0 deletions content/rest/pulls/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ versions:
children:
- /pulls
- /comments
- /copilot-review
- /review-requests
- /reviews
autogenerated: rest
Expand Down
2 changes: 2 additions & 0 deletions content/rest/pulls/review-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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