Skip to content

Commit e93a543

Browse files
obviousseanCopilot
andcommitted
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>
1 parent fea320c commit e93a543

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: REST API endpoints for the Copilot code review on a pull request
3+
shortTitle: Copilot review
4+
allowTitleToDifferFromFilename: true
5+
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.'
6+
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
7+
fpt: '*'
8+
ghec: '*'
9+
autogenerated: rest
10+
category:
11+
- Manage issues, pull requests, and projects
12+
---
13+
14+
## About requesting a {% data variables.copilot.copilot_code-review_short %}
15+
16+
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.
17+
18+
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.
19+
20+
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 %}.
21+
22+
<!-- Content after this section is automatically generated -->

content/rest/pulls/review-requests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ category:
1616

1717
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.
1818

19+
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.
20+
1921
<!-- Content after this section is automatically generated -->

0 commit comments

Comments
 (0)