Introduction
GitHub Copilot can review your code and provide feedback. Where possible, Copilot's feedback includes suggested changes which you can apply with a couple of clicks.
For a full introduction to GitHub Copilot 코드 검토, see About Copilot code review.
Using Copilot 코드 검토
These instructions explain how to use Copilot 코드 검토 in the GitHub website. To see instructions for other popular coding environments, use the tool switcher at the top of the page.
-
On GitHub.com, create a pull request or navigate to an existing pull request.
-
Open the Reviewers menu, then select Copilot.
-
Wait for Copilot to review your pull request. This usually takes less than 30 seconds.
-
Scroll down and read through Copilot's comments.
Copilot always leaves a "Comment" review, not an "Approve" review or a "Request changes" review. This means that Copilot's reviews do not count toward required approvals for the pull request, and Copilot's reviews will not block merging changes. For more details, see 필수 검토를 사용하여 끌어오기 요청 승인.
-
Copilot's review comments behave like review comments from humans. You can add reactions to them, comment on them, resolve them and hide them.
Any comments you add to Copilot's review comments will be visible to humans, but they won't be visible to Copilot, and Copilot won't reply.
Working with suggested changes provided by Copilot
Where possible, Copilot's feedback includes suggested changes which you can apply with a couple of clicks.
If you're happy with the changes, you can accept a single suggestion from Copilot and commit it, or accept a group of suggestions together in a single commit. For more information, see 끌어오기 요청에 피드백 통합.
Providing feedback on Copilot's reviews
You can provide feedback on Copilot's comments directly within each comment. We use this information to improve the product and the quality of Copilot's suggestions.
-
On a pull request review comment from Copilot, click the thumbs up (👍) or thumbs down (👎) button.
-
If you click the thumbs down button, you're asked to provide additional information. You can, optionally, pick the reason for your negative feedback and leave a comment before clicking Submit feedback.
Requesting a re-review from Copilot
When you push changes to a pull request that Copilot has reviewed, it won't automatically re-review your changes.
To request a re-review from Copilot, click the button next to Copilot's name in the Reviewers menu. For more information, see 끌어오기 요청 검토 요청.
참고 항목
When re-reviewing a pull request, Copilot may repeat the same comments again, even if they have been dismissed with the "Resolve conversation" button or downvoted with the thumbs down (👎) button.
Enabling automatic reviews
By default, you manually request a review from Copilot on each pull request, in the same way you would request a review from a human. However, you can set up Copilot to automatically review all pull requests. See Configuring automatic code review by Copilot.
Customizing Copilot's reviews with custom instructions
참고 항목
Copilot 코드 검토의 사용자 지정 지침은 공개 미리 보기 버전이며 변경될 수 있습니다.
이 기능은 Copilot Pro, Copilot Pro(프로)+, Copilot Business, Copilot Enterprise 플랜에서 사용할 수 있습니다.
공개 미리 보기 기간 동안 Copilot Business 또는 Copilot Enterprise 플랜을 사용하는 경우, 해당 플랜을 제공하는 조직 또는 엔터프라이즈에서 Opt in to preview features 설정이 활성화되어 있어야 합니다. Managing policies and features for Copilot in your organization 또는 Managing policies and features for Copilot in your enterprise 참조
리포지토리 사용자 지정 지침 파일을 추가하여 Copilot 코드 검토 동작을 사용자 지정합니다. 이렇게 하려면 리포지토리에 .github/copilot-instructions.md
파일을 만들고 코드를 검토할 때 Copilot에서 고려할 자연어 텍스트를 추가합니다. 이는 Copilot 채팅에서 사용하는 copilot-instructions.md
와 동일합니다. Adding repository custom instructions for GitHub Copilot을(를) 참조하세요.
코드 검토에 대한 사용자 지정 지침을 활성화하거나 비활성화하려면, 리포지토리 설정으로 이동한 다음, Copilot 아래의 Code Review로 이동하고 "Use custom instructions when reviewing pull requests" 옵션을 전환합니다.
예시
.github/copilot-instructions.md
파일의 이 예에는 리포지토리의 모든 Copilot 코드 검토에 적용될 세 가지 지침이 포함되어 있습니다.
When performing a code review, respond in Spanish.
When performing a code review, follow our internal security checklist.
When performing a code review, focus on readability and avoid nested ternary operators.
Customizing Copilot's reviews with coding guidelines
참고 항목
사용자 지정 코딩 가이드라인 기능은 Copilot Enterprise 플랜에서만 제공되며, 현재는 일부 고객에게만 제공됩니다.
Copilot 코드 검토를 사용하여 Visual Studio Code 또는 GitHub 웹 사이트의 변경 내용을 검토할 때 자연어로 작성된 사용자 지정 코딩 지침으로 Copilot의 검토를 사용자 지정할 수 있습니다. Copilot은 코드를 검토할 때 사용자의 코딩 지침에 기반하여 피드백을 제공합니다. 자세한 내용은 Configuring coding guidelines for GitHub Copilot code review을(를) 참조하세요.
코딩 지침에 따라 생성된 메모에는 해당 원본을 강조 표시하는 메시지가 포함됩니다.
Using Copilot 코드 검토
These instructions explain how to use Copilot 코드 검토 in Visual Studio Code. To see instructions for other popular coding environments, use the tool switcher at the top of the page.
참고 항목
Copilot 코드 검토 is available in Visual Studio Code with version 0.22 or later of the GitHub Copilot 채팅 extension.
Reviewing a selection of code
You can request an initial review of a highlighted selection of code in Visual Studio Code.
-
In Visual Studio Code, select the code you want to review.
-
Open the VS Code Command Palette
- For Mac:
- Use: Shift+Command+P
- For Windows or Linux:
- Use Ctrl+Shift+P
- For Mac:
-
In the command palette, search for and select GitHub Copilot: Review and Comment.
-
Wait for Copilot to review your changes. This usually takes less than 30 seconds.
-
If Copilot has any comments, they will be shown inline in your file, and in the Problems tab.
Reviewing all uncommitted changes
You can request a review of your uncommitted changes in Visual Studio Code.
-
In VS Code, click the Source Control button in the Activity Bar.
-
At the top of the Source Control view, hover over CHANGES, then click the Copilot Code Review - Uncommitted Changes button.
-
Wait for Copilot to review your changes. This usually takes less than 30 seconds.
-
If Copilot has any comments, they will be shown inline in your file(s), and in the Problems tab.
Working with suggested changes provided by Copilot
Where possible, Copilot's feedback includes suggested changes which you can apply with a single click.
If you're happy with the change, you can accept a suggestion from Copilot by clicking the Apply and Go To Next button. Any changes you apply will not be automatically committed.
If you don't want to apply Copilot's suggested change, click the Discard and Go to Next button.
Providing feedback on Copilot's reviews
You can provide feedback on Copilot's comments directly within each comment. We use this information to improve the product and the quality of Copilot's suggestions.
To provide feedback, hover over the comment and click the thumbs up or thumbs down button.
Customizing Copilot's reviews with custom instructions
참고 항목
Copilot 코드 검토의 사용자 지정 지침은 공개 미리 보기 버전이며 변경될 수 있습니다.
이 기능은 Copilot Pro, Copilot Pro(프로)+, Copilot Business, Copilot Enterprise 플랜에서 사용할 수 있습니다.
공개 미리 보기 기간 동안 Copilot Business 또는 Copilot Enterprise 플랜을 사용하는 경우, 해당 플랜을 제공하는 조직 또는 엔터프라이즈에서 Opt in to preview features 설정이 활성화되어 있어야 합니다. Managing policies and features for Copilot in your organization 또는 Managing policies and features for Copilot in your enterprise 참조
리포지토리 사용자 지정 지침 파일을 추가하여 Copilot 코드 검토 동작을 사용자 지정합니다. 이렇게 하려면 리포지토리에 .github/copilot-instructions.md
파일을 만들고 코드를 검토할 때 Copilot에서 고려할 자연어 텍스트를 추가합니다. 이는 Copilot 채팅에서 사용하는 copilot-instructions.md
와 동일합니다. Adding repository custom instructions for GitHub Copilot을(를) 참조하세요.
코드 검토에 대한 사용자 지정 지침을 활성화하거나 비활성화하려면, 리포지토리 설정으로 이동한 다음, Copilot 아래의 Code Review로 이동하고 "Use custom instructions when reviewing pull requests" 옵션을 전환합니다.
예시
.github/copilot-instructions.md
파일의 이 예에는 리포지토리의 모든 Copilot 코드 검토에 적용될 세 가지 지침이 포함되어 있습니다.
When performing a code review, respond in Spanish.
When performing a code review, follow our internal security checklist.
When performing a code review, focus on readability and avoid nested ternary operators.
Customizing Copilot's reviews with coding guidelines
참고 항목
사용자 지정 코딩 가이드라인 기능은 Copilot Enterprise 플랜에서만 제공되며, 현재는 일부 고객에게만 제공됩니다.
Copilot 코드 검토를 사용하여 Visual Studio Code 또는 GitHub 웹 사이트의 변경 내용을 검토할 때 자연어로 작성된 사용자 지정 코딩 지침으로 Copilot의 검토를 사용자 지정할 수 있습니다. Copilot은 코드를 검토할 때 사용자의 코딩 지침에 기반하여 피드백을 제공합니다. 자세한 내용은 Configuring coding guidelines for GitHub Copilot code review을(를) 참조하세요.
코딩 지침에 따라 생성된 메모에는 해당 원본을 강조 표시하는 메시지가 포함됩니다.
Prerequisite
To use Copilot 코드 검토, you must use Visual Studio version 17.14 or later. See the Visual Studio downloads page.
Using Copilot 코드 검토
These instructions explain how to use Copilot 코드 검토 in Visual Studio. To see instructions for other popular coding environments, use the tool switcher at the top of the page.
-
In the Git Changes window, click Review changes with Copilot. This button appears as a comment icon with a sparkle.
-
Copilot will begin reviewing your changes. After a few moments, a link showing the number of code review comments appears in the Git Changes window.
-
Click the link to view and navigate the comments. If no issues are found, you’ll see the message: Copilot did not comment on any files.
-
Copilot displays comments in your code with a summary of each potential issue. You can:
- Review and make changes based on the suggestions.
- Dismiss a comment using the downward arrow in the top-right corner of the comment box.
-
To remove all review comments, click next to the code review link in the Git Changes window.
For more information on enabling and configuring Copilot 코드 검토 in Visual Studio, see Review local changes with Copilot 채팅 in the Visual Studio documentation.
Using Copilot 코드 검토
These instructions explain how to use Copilot 코드 검토 in GitHub Mobile. To see instructions for other popular coding environments, use the tool switcher at the top of the page.
- In GitHub Mobile, open a pull request.
- Scroll down to the Reviews section and expand it.
- Click Request Reviews.
- Add Copilot as a reviewer, then click Done.
Copilot will review the changes and provide feedback.