About Copilot 코드 검토
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.
Copilot 코드 검토 in Visual Studio Code supports two types of review:
- Review selection: Highlight code and ask for an initial review
- Review changes: Request a deeper review of all your changes
The current functionality and availability of the two types of review is summarized in the following table:
Review selection | Review changes | |
---|---|---|
Available in | Visual Studio Code | Visual Studio Code and the GitHub website |
Premium/standard feature | Standard feature available to all Copilot subscribers | Premium feature. Available with the Copilot Pro, Copilot Pro(프로)+, Copilot Business, and Copilot Enterprise plans. Per-person monthly quota applies. |
Description | Initial review of a highlighted section of code with feedback and suggestions | Deeper review of all changes |
Language support | All | All |
Custom coding guidelines support | No | Yes, see Customizing Copilot's reviews with coding guidelines |
Code review monthly quota
The review changes type of Copilot 코드 검토 is a premium feature with a per-person monthly quota.
When you assign Copilot as a reviewer for a pull request, one premium request is deducted from your monthly quota each time Copilot posts comments to the pull request. See Understanding and managing requests in Copilot.
If a repository is configured to automatically request a code review from Copilot for all new pull requests, the premium request usage is applied to the quota of the pull request author. If a pull request is created by GitHub Actions or by a bot, the usage will apply to the user who triggered the workflow (if identifiable), or to a designated billing owner.
When you reach your monthly quota you will not be able to get a code review from Copilot until your quota resets—unless you upgrade your Copilot plan or enable additional premium requests.
Two types of Copilot 코드 검토 are available:
- Review selection: Highlight code and ask for an initial review (only available in VS Code)
- Review changes: Request a deeper review of all your changes (available in VS Code and the GitHub website)
This version of the article relates to Copilot 코드 검토 on the GitHub website. To see information about the review selection type of Copilot 코드 검토, click the "Visual Studio Code" tool switcher at the top of the page.
Availability
Copilot 코드 검토 on the GitHub website is a premium feature, available with the Copilot Pro, Copilot Pro(프로)+, Copilot Business, and Copilot Enterprise plans.
Code review monthly quota
The review changes type of Copilot 코드 검토 is a premium feature with a per-person monthly quota.
When you assign Copilot as a reviewer for a pull request, one premium request is deducted from your monthly quota each time Copilot posts comments to the pull request. See Understanding and managing requests in Copilot.
If a repository is configured to automatically request a code review from Copilot for all new pull requests, the premium request usage is applied to the quota of the pull request author. If a pull request is created by GitHub Actions or by a bot, the usage will apply to the user who triggered the workflow (if identifiable), or to a designated billing owner.
When you reach your monthly quota you will not be able to get a code review from Copilot until your quota resets—unless you upgrade your Copilot plan or enable additional premium requests.
Language support
Copilot 코드 검토 on the GitHub website supports all languages.
Validating Copilot code reviews
경고
Copilot isn't guaranteed to spot all problems or issues in a pull request, and sometimes it will make mistakes. Always validate Copilot's feedback carefully, and supplement Copilot's feedback with a human review.
For more information, see GitHub Copilot 코드 검토의 책임 있는 사용.
Requesting a review from 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.
Requesting a pull request review from Copilot
-
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 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을(를) 참조하세요.
코딩 지침에 따라 생성된 메모에는 해당 원본을 강조 표시하는 메시지가 포함됩니다.
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 only 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 changes
You can request a review for your staged or unstaged changes in Visual Studio Code.
-
In VS Code, switch to the Source Control tab.
-
To request a review on your unstaged changes, hover over Changes in the sidebar, and then click the Copilot 코드 검토 - Changes button.
-
To request a review on your staged changes, hover over Staged Changes in the sidebar, and then click the Copilot 코드 검토 - Staged 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 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을(를) 참조하세요.
코딩 지침에 따라 생성된 메모에는 해당 원본을 강조 표시하는 메시지가 포함됩니다.
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.
To use Copilot 코드 검토, you must use Visual Studio version 17.14 or later. See the Visual Studio downloads 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.