Github Copilot code review #189846
Replies: 1 comment
-
|
I’d treat this as two separate tools, because the PR reviewer and the CLI agent are not the same thing. For PR reviews, GitHub says Copilot uses the custom instructions from the PR’s base branch, and code review only reads the first 4,000 characters, so long instructions can easily get cut off: https://docs.github.com/copilot/using-github-copilot/code-review/using-copilot-code-review For the CLI, GitHub’s docs(https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/create-skills) suggest using skills for task-specific behavior and keeping general repo guidance in custom instructions. So my practical suggestion is: shorten your repo review instructions, make sure they’re on the base branch, and make your CLI review skill more procedural: run lint/tests/static analysis first, then ask it to check correctness, security/perf, and missing edge cases in separate passes. That matches GitHub’s own guidance to be specific and break complex tasks into smaller steps: https://docs.github.com/en/copilot/get-started/best-practices |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
Copilot in GitHub
Body
My organisation has started using the code review feature whenever we open a PR. It's quality has improved to the point that the issues it's catching are real and valid (if a little bit nit picky). One thing that frustrates me is that I usually have to go through a few rounds of review and each round it picks up issues that should have been found in the first review round. We've created a custom instruction to improve the review results but it hasn't reduced the number of rounds we need to do. I've created a skill for an agent (using copilot CLI) that reviews the code without having to push to the repo and create a PR so that I can shorten the feedback loop, but it doesn't find as many issues as the code review agent that gets triggered on PRs. I can't find any suggestions or documents to hint at a prompt, skill or instruction that could get better results out of the CLI review agent. Does anyone have any hints or suggestions?
Beta Was this translation helpful? Give feedback.
All reactions