Use Case 5: "PRs take forever to review"
Scenario: Your team has a backlog of 15 pull requests. Reviews are shallow because reviewers are overwhelmed.
Time: ~15 minutes
Copilot Features: GitHub Copilot app, PR-scoped sessions, Copilot code review, Copilot cloud agent
Your Challenge: Combine human judgment with agentic review and remediation to catch issues and move a pull request through CI.
Table of Contents
- Step 1: Open the Pull Request Overview
- Step 2: Review the Changed Files
- Step 3: Start a PR-Scoped Review Session
- Step 4: Retain Copilot Code Review on GitHub.com
- Step 5: Resolve Comments and Failing Checks
- Optional: Enable Agent Merge
- What You Learned
- Next Steps
Step 1: Open the Pull Request Overview
- Open the GitHub Copilot app.
- Select My work.
- Find and open the cart pull request you created in Feature Development.
- Review the pull request overview:
- Summary and linked issue
- Review activity
- CI check status
- Merge blockers
Treat the overview as a starting point, not an approval. You remain responsible for understanding the change and deciding whether it is safe to merge.
Step 2: Review the Changed Files
- Open the Files changed tab.
- Read the diff and verify that it matches the pull request description.
- Pay particular attention to:
- Cart state and navigation behavior
- Quantity, shipping, and total calculations
- Accessibility and the supplied design
- Tests and error handling
- Unexpected or unrelated changes
- Leave review comments on any lines that need clarification or correction.
Step 3: Start a PR-Scoped Review Session
-
From the pull request, click New session.
-
Keep the model set to Auto.
-
Ask Copilot to inspect the pull request:
Review this pull request for correctness, missing tests, compliance gaps, and unintended changes. Prioritize concrete issues that could block merging, and explain each finding with file references. -
Compare the agent's findings with your own review of Files changed.
-
Ask follow-up questions or steer the session when a finding needs more evidence.
-
Return to the pull request and click Review when you are ready to submit your comments.
The PR-scoped session keeps the conversation, diff, and pull request lifecycle together. It can help investigate a concern, draft a review comment, or make an approved fix.
/review is a built-in Copilot CLI command for reviewing changes in your current checkout. You can optionally add a prompt, path, or file pattern to narrow its scope. /code-review is not a standard built-in command; if it appears in your environment, it comes from an installed customization.
Step 4: Retain Copilot Code Review on GitHub.com
Copilot code review on GitHub.com remains useful when you want an independent, agentic review in the standard pull request workflow:
- Open the same pull request on GitHub.com.
- Under Reviewers, choose Balanced effort for this exercise, then request a review from Copilot. The cart change crosses UI state, calculations, and tests, so the deeper analysis is appropriate. Use Lite for routine changes where fast, targeted feedback is sufficient.
- Wait for Copilot to add its pull request overview and inline review comments.
- Notice the High, Medium, or Low severity on each finding. Severity prioritizes the output; it is separate from the Lite or Balanced effort selected before the review.
- Validate each finding before applying a suggested change.
Copilot code review can use repository context and custom instructions, including path-specific instructions in .github/instructions/. Its comments behave like human review comments: reviewers can reply, react, hide, or resolve them. Unlike the app session in Step 3, Copilot code review uses a purpose-built model configuration; you choose the review effort rather than an individual chat model.
Copilot code review can also invoke relevant Agent Skills from .github/skills and use read-only tools from repository-configured MCP servers. The refreshed Octocat Supply source includes a review-focused skill at .github/skills/code-review/SKILL.md that loads linked issue context through the GitHub MCP server and checks implementation correctness, type safety, error handling, test coverage, and performance. If your workshop copy includes that skill, review it and look for skill or MCP attribution in Copilot's comments. Configuring a new skill or MCP server is optional and outside the scope of this exercise.
By default, Copilot submits a comment review rather than an approval or request for changes. It does not replace required human review unless your organization explicitly configures Copilot approvals.
Step 5: Resolve Comments and Failing Checks
Return to the pull request in the GitHub Copilot app:
- Scroll to a review comment that requires a code change.
- Click Fix to start or direct a Copilot session with the comment context.
- Review the proposed edit and focused validation before accepting it.
- At the bottom of the pull request overview, inspect the latest CI results.
- If a check fails, open its logs to understand the failure, then click Fix failing checks.
- Review the resulting commits and Files changed again.
- Re-run or wait for CI, then confirm that required checks pass and review threads are resolved.
Copilot cloud agent can implement fixes in an isolated environment and push commits to the pull request branch. Human reviewers should still verify the final diff and test results.
Optional: Enable Agent Merge
If agent merge is available and your facilitator approves its use, you can enable agent merge at the top of the app. The workspace's Copilot session will monitor the pull request, attempt to fix blockers, and merge only when GitHub allows.
Enable agent merge only after a human reviews the diff, workflow changes, and CI results. Agent merge does not bypass branch protection, required checks, required approvals, or organization policies. A Copilot-authored pull request may still require approval from another eligible reviewer.
You can leave agent merge disabled and complete the merge manually. It is not required for this exercise.
Before End-to-End Tests, either merge the cart pull request or keep its branch available. The E2E exercise must start from code that includes the cart feature.
What You Learned
✅ Pull Request Overview - See review activity, CI status, and merge blockers together
✅ Files Changed - Validate the actual diff before approving changes
✅ PR-Scoped Sessions - Investigate findings and direct fixes with pull request context
✅ Copilot Code Review - Add agentic feedback to the GitHub.com review workflow
✅ Targeted Remediation - Use Copilot to address comments and failing checks
✅ Human-Controlled Merge - Preserve approvals, required checks, and repository policies
Time Investment: 15 minutes
Value: Faster review cycles without giving up human accountability
Next Steps
Continue to Security to learn how to fix vulnerabilities faster with Copilot.