Skip to content

Add Copilot review + auto-merge workflow#51

Open
cori wants to merge 1 commit into
mainfrom
claude/copilot-review-workflow
Open

Add Copilot review + auto-merge workflow#51
cori wants to merge 1 commit into
mainfrom
claude/copilot-review-workflow

Conversation

@cori

@cori cori commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fans in the Copilot review + auto-merge workflow from claude-code-base (branch claude/great-clarke-fpor65) so it can be exercised here, where PR traffic is heavier.
  • On pull_request (opened / ready_for_review), looks up Copilot's bot id via GraphQL suggestedActors and requests a review.
  • On pull_request_review from copilot-pull-request-reviewer[bot], enables squash auto-merge if the review is clean (no changes_requested, no inline comments).
  • Workflow-level perms are read-only; each job opts into the writes it needs.

Test plan

  • Confirm Copilot code review is enabled in repo settings.
  • Watch this PR's Actions run — request-copilot-review should succeed and a Copilot review should be requested.
  • If Copilot returns a clean review, verify auto-merge-on-clean-copilot-review enables squash auto-merge.
  • Open a follow-up PR with a deliberate nit to confirm auto-merge is correctly skipped when Copilot leaves inline comments.

🤖 Generated with Claude Code

Fanned in from claude-code-base (branch claude/great-clarke-fpor65) to
exercise the workflow here, where PR traffic is heavier.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to (1) request a GitHub Copilot PR review when a PR is opened or marked ready-for-review, and (2) enable squash auto-merge when Copilot submits a clean review.

Changes:

  • Introduces copilot-review.yml workflow to request Copilot review via GraphQL (suggestedActorsrequestReviews).
  • Adds a pull_request_review trigger that conditionally enables squash auto-merge when Copilot’s review has no inline comments and no “changes requested”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
}
' \
--jq '[.data.repository.suggestedActors.nodes[] | select(.login == "Copilot" or .login == "copilot-pull-request-reviewer") | .id] | first // ""')
Comment on lines +65 to +68
if: >-
github.event_name == 'pull_request_review' &&
github.event.review.user.login == 'copilot-pull-request-reviewer[bot]' &&
github.event.pull_request.draft == false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants