The Review Agent is GitHub Copilot’s automated pull request reviewer. It reads the diff, relevant files, and commit history, combines that context with your instructions, and generates structured feedback. Compared with static linting, the Review Agent behaves more like a collaborative reviewer who understands semantics, asks follow-up questions, and iterates.
Key capabilities:
- Diff comprehension: analyze additions, modifications, and deletions to spot risky areas (security, performance, concurrency, maintainability).
- Context retrieval: pull in related files, dependencies, and definitions when needed so it doesn’t judge changes in isolation.
- Structured feedback: flag bugs, style problems, complexity concerns, security risks, and testing gaps with actionable guidance.
We will use GitHub Copilot Review Agent to:
- Automatically review an existing pull request.
- Node.js: >= 22.0.0
- npm: >= 10.0.0
- VS Code: latest version
- GitHub Copilot: signed in
Commit code that contains issues.
-
Create a branch locally
git checkout -b feature/testbranch
-
Add a problematic TypeScript file In Copilot Chat (Agent mode) run:
Create a TypeScript sorting algorithm with potential issues and save it to sort.ts. -
Push to GitHub Commit the changes locally and push the branch to the remote repository.
- The new branch appears on GitHub.
Use the Review Agent to evaluate the pull request.
-
Open a PR and request Copilot’s review Click request review from Copilot while creating the PR.

-
Inspect the review results After a short while, Copilot’s review feedback will appear.

- The review results are visible on GitHub. (Do not merge this PR yet; later labs will continue using it.)