Skip to content

Commit db8473b

Browse files
BagToadCopilotjc-clark
authored
Add GitHub CLI tab to Copilot code review page (#60149)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
1 parent 2b5fd07 commit db8473b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

content/copilot/concepts/agents/code-review.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ This article provides an overview of {% data variables.copilot.copilot_code-revi
2626
{% data variables.copilot.copilot_code-review_short %} is supported in:
2727

2828
* {% data variables.product.prodname_dotcom_the_website %}
29+
* {% data variables.product.prodname_cli %}
2930
* {% data variables.product.prodname_mobile %}
3031
* {% data variables.product.prodname_vscode_shortname %}
3132
* {% data variables.product.prodname_vs %}

content/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,43 @@ These instructions explain how to use {% data variables.copilot.copilot_code-rev
235235
1. If there is more than one comment, use the up and down arrows, at the top right of the popup, to navigate between comments.
236236

237237
{% endjetbrains %}
238+
239+
{% cli %}
240+
241+
## Prerequisites
242+
243+
* **Access to {% data variables.product.prodname_copilot_short %}**. {% data reusables.copilot.subscription-prerequisite %}
244+
* **{% data variables.product.prodname_cli %}**. You must have the {% data variables.product.prodname_cli %} installed and authenticated. See [AUTOTITLE](/github-cli/github-cli/quickstart).
245+
246+
## Using {% data variables.copilot.copilot_code-review_short %}
247+
248+
These instructions explain how to use {% data variables.copilot.copilot_code-review_short %} with the {% data variables.product.prodname_cli %}. To see instructions for other popular coding environments, click the appropriate tab at the top of the page.
249+
250+
### Requesting a review when creating a pull request
251+
252+
You can request a review from {% data variables.product.prodname_copilot_short %} when creating a new pull request using `gh pr create`:
253+
254+
```shell copy
255+
gh pr create --reviewer @copilot
256+
```
257+
258+
You can also select {% data variables.product.prodname_copilot_short %} interactively from the searchable reviewer prompt during `gh pr create`.
259+
260+
```text
261+
? Reviewers [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
262+
[ ] Search (7472 more)
263+
[x] monalisa (Mona Lisa)
264+
> [x] Copilot (AI)
265+
```
266+
267+
### Requesting a review on an existing pull request
268+
269+
To request a review from {% data variables.product.prodname_copilot_short %} on an existing pull request, use `gh pr edit`. If you are not on the pull request's branch, specify the pull request number:
270+
271+
```shell copy
272+
gh pr edit PR-NUMBER --add-reviewer @copilot
273+
```
274+
275+
Replace `PR-NUMBER` with the number of the pull request you want reviewed. If you have the pull request's branch checked out, you can omit the number.
276+
277+
{% endcli %}

0 commit comments

Comments
 (0)