Add GitHub Copilot code review custom instructions#65
Draft
Conversation
a3e86b8 to
fac5930
Compare
There was a problem hiding this comment.
Pull request overview
Adds GitHub Copilot Code Review custom instruction files under .github/ to provide layered, path-scoped review guidance (NestJS, security, database, and testing) on top of a global baseline.
Changes:
- Add global Copilot code review guidelines at
.github/copilot-instructions.md - Add scoped instruction packs in
.github/instructions/for NestJS, security, database, and testing concerns - Define
applyToglobs to control which instruction packs apply to which file domains
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/copilot-instructions.md | Establishes global review priorities/principles for all reviews. |
| .github/instructions/nestjs.instructions.md | Adds NestJS architecture/validation guidance scoped to src/**/*.ts. |
| .github/instructions/security.instructions.md | Adds auth/OWASP-focused guidance scoped to auth/guards/strategies. |
| .github/instructions/database.instructions.md | Adds TypeORM/query guidance scoped to entities/services/repositories. |
| .github/instructions/testing.instructions.md | Adds test quality/isolation/async guidance scoped to test files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| ## Assertions | ||
|
|
||
| - Assert behavior, not implementation details | ||
| - Use descriptive assertion messages |
Comment on lines
+9
to
+11
| - JWT secrets must come from environment variables | ||
| - Passwords must be hashed with bcrypt (min 10 rounds) | ||
| - Never log or return passwords in responses |
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.
Add GitHub Copilot Code Review Custom Instructions
Summary
This PR adds layered custom instructions for GitHub Copilot Code Review, enabling automated, context-aware code reviews based on file paths and domains.
How It Works
Layer Combination Examples
src/auth/auth.service.tssrc/targets/target.entity.tssrc/test/users/login.e2e-spec.tssrc/users/users.controller.tsFile Structure
Key Design Decisions
References