-
Notifications
You must be signed in to change notification settings - Fork 8
Merge Pr
github-actions[bot] edited this page Feb 23, 2026
·
1 revision
Merge a pull request after verifying it is ready. The agent checks approvals, CI status, and conflicts, suggests a merge strategy, and requires explicit confirmation before merging.
- Merging a PR that has been approved and is CI-green
- Choosing the right merge strategy (squash vs. merge commit vs. rebase)
- Cleaning up the source branch after merge
- Triggering a planned merge at end of review
In GitHub Copilot Chat:
/merge-pr owner/repo#123
Or for the current branch PR:
/merge-pr
- Readiness check — Verifies approvals, CI status, and merge conflict state
- Strategy recommendation — Suggests squash, merge commit, or rebase based on PR size and history
-
Confirmation prompt — Shows the proposed merge and asks for your explicit
yesbefore proceeding - Execute merge — Merges the PR via the GitHub API
- Post-merge cleanup — Optionally deletes the source branch
| Criterion | Required |
|---|---|
| At least one approval | Yes (for protected branches) |
| All required CI checks passing | Yes |
| No unresolved merge conflicts | Yes |
| PR not in draft state | Yes |
| All requested reviews completed | Preferred (warning if any outstanding) |
If any required criterion fails, the agent explains the blocker and does not merge.
| Strategy | When recommended |
|---|---|
| Squash and merge | Feature branches with noisy commit history |
| Merge commit | Release branches, significant multi-commit PRs |
| Rebase and merge | Clean linear commits, author wrote good messages |
Merge readiness — owner/repo#123 "Add authentication":
✅ Approved by: alice (2 days ago)
✅ CI: all 3 checks passing
✅ No merge conflicts
✅ Not a draft
Suggested strategy: Squash and merge
(14 commits → 1 clean commit)
Proceed with squash merge? (yes/no/change-strategy)
After a successful merge, the agent offers:
- Delete the source branch
- Close any linked issues with the merge
- Update the linked project board column
/merge-pr # Detect from current branch
/merge-pr owner/repo#123 # Specific PR
/merge-pr owner/repo#123 squash # Force squash strategy
/merge-pr owner/repo#123 no-delete # Keep source branch after merge
| Agent | Role |
|---|---|
| pr-review agent | Executes this prompt |
- review-pr — do a final review before merging
- address-comments — resolve blocking comments first
- manage-branches — clean up branches after merge
- pr-author-checklist — check readiness before requesting merge
- Accessibility Lead
- Web Accessibility Wizard
- Document Accessibility Wizard
- Alt Text and Headings
- ARIA Specialist
- Contrast Master
- Forms Specialist
- Keyboard Navigator
- Link Checker
- Live Region Controller
- Modal Specialist
- Tables Data Specialist
- Word Accessibility
- Excel Accessibility
- PowerPoint Accessibility
- PDF Accessibility
- Office Scan Config
- PDF Scan Config
- Testing Coach
- WCAG Guide