Merge pull requests following the required bugbot review process. Use when merging PRs to ensure CI passes and bugbot approval is obtained.
This skill describes the required process for merging pull requests. PRs must have both passing CI and passing bugbot review on the latest commit before merging.
gh) available in PATHNEVER merge a PR without:
Bugbot may provide feedback in different ways:
A bugbot review is only considered complete when bugbot returns "LGTM" indicating there are no remaining issues.
Even if bugbot indicates a PR is "good to merge" or "approved", any feedback or suggestions provided should be addressed. After addressing the feedback:
@cursor please reviewBugbot's minor suggestions often catch:
Addressing all feedback ensures higher code quality and prevents accumulating technical debt.
# Get recent workflow runs - check the commit SHA matches your latest
gh api repos/OWNER/REPO/actions/runs \
--jq '.workflow_runs[:5] | .[] | "\(.id) \(.status) \(.conclusion // "running") \(.name) \(.head_sha[:7])"'
Verify the commit SHA - The head_sha in the output must match your latest pushed commit.
# Get PR reviews and comments - look for cursor[bot]
gh pr view PR_NUMBER --repo OWNER/REPO --json reviews,comments
# Get detailed review comments
gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments
A passing bugbot review contains LGTM (case insensitive):
"body": "LGTM — changes look good..."
These responses require action before merging:
"body": "Approved — ... [suggestions follow]"
"body": "Good to merge. [feedback follows]"
"body": "Changes requested: ..."
If bugbot provides ANY feedback or suggestions, address them and request a new review.
gh pr comment PR_NUMBER --repo OWNER/REPO --body "@cursor please review"
When bugbot provides feedback (even minor suggestions):
git add -A && git commit -m "Address bugbot review feedback"
git push
gh pr comment PR_NUMBER --repo OWNER/REPO --body "@cursor please review"
Only skip bugbot feedback if:
Once bugbot returns LGTM on the latest commit:
# Final verification
gh pr view PR_NUMBER --repo OWNER/REPO --json reviews,comments
# Check latest commit SHA
git rev-parse HEAD
# Verify LGTM is on latest commit
# Merge
gh pr merge PR_NUMBER --repo OWNER/REPO --merge --delete-branch
Before merging, confirm ALL of the following:
Read the full comment. If there's any feedback, address it and request another review.
Push your changes and add @cursor please review to trigger a new review.
Wait for CI to run on the latest commit, or push again to trigger a new run.
# 1. Check current commit
git rev-parse HEAD # abc1234
# 2. Check bugbot review
gh pr view 24 --repo owner/repo --json comments --jq '.comments[-1].body'
# "Approved — docs look good. Minor suggestion: add example for edge case."
# 3. Bugbot gave feedback - address it
# ... make changes ...
git add -A && git commit -m "Add edge case example per bugbot feedback"
git push
# 4. Request new review
gh pr comment 24 --repo owner/repo --body "@cursor please review"
# 5. Wait and check for LGTM
sleep 60
gh pr view 24 --repo owner/repo --json comments --jq '.comments[-1].body'
# "LGTM — changes look good."
# 6. Now OK to merge
gh pr merge 24 --repo owner/repo --merge --delete-branch