Does GitHub Copilot code review use repo instructions in the PR being reviewed?
Yes. GitHub Copilot code review reads repository custom instructions from the PR’s head branch, so instructions in the branch being reviewed can affect the review. It does not use the base branch copy instead.
Other people are working this out at the same time: See what people are building
Does GitHub Copilot code review use repo instructions in the PR being reviewed
Yes. When Copilot reviews a pull request, it reads repository custom instructions from the head branch, the branch with your changes, not the base branch. That is the version that can shape the review, so edits to instructions in the PR can matter before merge.
The part people get wrong is assuming the review only reflects the target branch. GitHub’s documentation is explicit that Copilot reads repository custom instructions, agent instructions, and agent skills from the head branch. If the PR changes those files, Copilot can review against the updated instructions in that branch.
The inconvenient part is scope. Copilot does not magically infer every local convention from the PR description or from the base branch. The docs say the more Copilot knows about the repository, tools, and coding standards, the more useful its reviews become, and they point to custom instructions, AGENTS.md, and skills as the supported ways to provide that context.
For repository-wide review guidance, GitHub recommends .github/copilot-instructions.md. For path-specific guidance, it recommends .github/instructions/**/*.instructions.md. For repository context shared across agents, it recommends AGENTS.md. Copilot code review can draw on those sources, but the important detail for this question is that it reads them from the PR’s head branch when it reviews the pull request.
A practical example helps. If a PR changes .github/copilot-instructions.md to say “prefer explicit null checks,” Copilot’s review of that same PR can see that instruction from the PR branch. If the base branch still has older instructions, Copilot uses the PR branch copy for the review it is doing now.
That also means instruction changes can be reviewed by the very tool they are meant to influence. If you are testing a new review rule, put it in the branch, request a review, and inspect whether Copilot follows it. GitHub’s docs also note that when you push new changes to a PR, Copilot does not automatically re-review unless automatic reviews are configured for new pushes.
Automatic review settings do not change this branch rule. They change when Copilot reviews, not which branch’s repository instructions it reads. GitHub documents automatic reviews at the user, repository, and organization levels, and separately documents that the review reads custom instructions, agent instructions, and agent skills from the head branch.
If you want Copilot to follow a rule during review, store that rule in the repository files that Copilot supports, then make sure the PR branch contains the version you want reviewed. If the file lives only in the base branch, Copilot’s review of the PR will not use a later version that exists only after merge, because it is reading the head branch at review time.
In short, the answer is yes, and the branch matters. Copilot code review uses the repo instructions that are present in the PR being reviewed, because it reads them from the head branch rather than the base branch.
If you are setting this up in a real repo, GitHub’s supported pattern is to keep review rules in .github/copilot-instructions.md, add path-specific rules only where needed, and use AGENTS.md for shared context across agents. That keeps the instructions available to Copilot review instead of buried in a pull request comment thread.
If you are building with DevConnect, the same discipline applies: put durable rules in the repo, not in a one-off message. The platform itself is separate, but the workflow problem is the same, because review tools can only follow instructions they can actually read in the repository. https://devconnectplatform.com
FAQ
Does Copilot read instructions from the base branch instead of the PR branch No. GitHub says Copilot reads repository custom instructions, agent instructions, and agent skills from the head branch, not the base branch, when reviewing a pull request.
Which files can Copilot use for review guidance
GitHub documents .github/copilot-instructions.md for repository-wide rules, .github/instructions/**/*.instructions.md for path-specific rules, and AGENTS.md for shared repository context across agents.
If I edit instructions in the PR, will Copilot use them right away Yes, if the edited instruction file is in the PR’s head branch and the file type is one Copilot supports. The review uses the branch being reviewed, so the current branch copy is the one that matters.
Will Copilot automatically review again after I push new commits Not by default. GitHub says Copilot does not automatically re-review new pushes unless automatic reviews are configured to include new pushes.
Can I rely on Copilot review to catch instruction mistakes No single review pass guarantees that. GitHub describes Copilot as giving feedback and suggested fixes, but the branch and instruction files still have to be set up correctly for the review to reflect your intended rules.
Frequently asked questions
Does Copilot read instructions from the base branch instead of the PR branch
No. GitHub says Copilot reads repository custom instructions, agent instructions, and agent skills from the head branch, not the base branch, when reviewing a pull request.
Which files can Copilot use for review guidance
GitHub documents `.github/copilot-instructions.md` for repository-wide rules, `.github/instructions/**/*.instructions.md` for path-specific rules, and `AGENTS.md` for shared repository context across agents.
If I edit instructions in the PR, will Copilot use them right away
Yes, if the edited instruction file is in the PR’s head branch and the file type is one Copilot supports. The review uses the branch being reviewed, so the current branch copy is the one that matters.
Will Copilot automatically review again after I push new commits
Not by default. GitHub says Copilot does not automatically re-review new pushes unless automatic reviews are configured to include new pushes.
Can I rely on Copilot review to catch instruction mistakes
No single review pass guarantees that. GitHub describes Copilot as giving feedback and suggested fixes, but the branch and instruction files still have to be set up correctly for the review to reflect your intended rules.
Know someone stuck on this? Send them the answer.
Sources
Every link here was fetched and confirmed to resolve before this page went live.
- About GitHub Copilot code review - GitHub Docs
- Using GitHub Copilot code review - GitHub Docs
- Configuring code review by GitHub Copilot - GitHub Docs
- Use GitHub Copilot code review across the pull request lifecycle - GitHub Docs
- Using GitHub Copilot code review on GitHub Enterprise Cloud - GitHub Docs
Related questions
- How Copilot Code Review Uses PR Branch Instructions
- Can Copilot code review read PR-branch instructions?
- Can Copilot code review use repo-specific standards?
Not the question you had?
Ask it. Every source gets fetched and checked before anything goes up, so it takes a day or two, and questions that cannot be answered honestly do not get a page at all.
Everyone here builds with AI, and says so
DevConnect is for developers who use AI and are honest about it. The interesting part is not that the code was generated, it is what you did with it afterwards.