Adding instructions to the Code Review agent#31
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new Copilot instructions file with custom code review rules:
- Validate that README.md changes align with the PR
- Enforce single-quoted front matter values and non-empty description
- Require an
applyToproperty in front matter for.instructions.mdfiles
| @@ -0,0 +1,7 @@ | |||
| When performing a code review, validate that there are changes in the `README.md` file that match the changes in the pull request. If there are no changes, or if the changes do not match, then the pull request is not ready to be merged. | |||
There was a problem hiding this comment.
This instructions file lacks the required YAML front matter with an applyTo property. Without it, Copilot Code Review won’t know which files these rules should apply to. Please add front matter at the top specifying something like:
---
applyTo: ['.github/copilot-instructions.md']
---|
|
||
| When performing a code review, ensure that the `description` field in the front matter is not empty. | ||
|
|
||
| When performing a code review on a `.instructions.md` file, ensure there is an `applyTo` property in the front matter that specifies the file or files to which the instructions apply. |
There was a problem hiding this comment.
[nitpick] The rule refers to .instructions.md files, but this file is named copilot-instructions.md. Consider updating the pattern or the instruction text so the file naming convention matches (e.g., use .copilot-instructions.md in the rule).
Suggested change
| When performing a code review on a `.instructions.md` file, ensure there is an `applyTo` property in the front matter that specifies the file or files to which the instructions apply. | |
| When performing a code review on a `copilot-instructions.md` file, ensure there is an `applyTo` property in the front matter that specifies the file or files to which the instructions apply. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following the guide from https://docs.github.com/en/copilot/how-tos/agents/copilot-code-review/using-copilot-code-review\#customizing-copilots-reviews-with-custom-instructions