Loading...
Loading...
Use before merging PR - final gate ensuring all tests pass, review complete, CI green, and acceptance criteria verified
npx skill4agent add troykelly/codex-skills verification-before-merge┌──────────────────────────────────────────────────────┐
│ MERGE GATES │
├──────────────────────────────────────────────────────┤
│ [ ] CI Pipeline Green │
│ [ ] Local Integration Tests Pass (if services) │
│ [ ] All Tests Pass │
│ [ ] Code Review Approved │
│ [ ] Acceptance Criteria Verified │
│ [ ] No Unresolved Conversations │
│ [ ] Branch Up to Date │
│ [ ] No Merge Conflicts │
├──────────────────────────────────────────────────────┤
│ ALL GREEN → MERGE ALLOWED │
│ ANY RED → MERGE BLOCKED │
└──────────────────────────────────────────────────────┘# Check all CI checks
gh pr checks [PR_NUMBER]
# Expected: All passing
✓ build passed
✓ lint passed
✓ test passed
✓ typecheck passed
✓ security passedci-monitoring# Verify services are running (if project has docker-compose)
docker-compose ps
# Run integration tests against real services
pnpm test:integration
# Verify migrations work
pnpm migratelocal-service-testing# Verify locally (CI should have done this, but verify)
pnpm test
# Check coverage
pnpm test --coverage# Check review status
gh pr view [PR_NUMBER] --json reviews
# Expected: At least one approval, no changes requestedgh issue view [ISSUE_NUMBER] --json body## Acceptance Criteria
- [x] User can log in
- [x] Invalid credentials show error
- [x] Session persists
- [x] Logout clears session# Check for unresolved threads
gh pr view [PR_NUMBER] --json reviewThreads# Check if branch is behind target
gh pr view [PR_NUMBER] --json mergeable,mergeStateStatus
# If behind, update
git fetch origin
git rebase origin/main
git push --force-with-lease# Check for conflicts
gh pr view [PR_NUMBER] --json mergeablegit fetch origin
git rebase origin/main
# Resolve conflicts
git add .
git rebase --continue
git push --force-with-lease## Pre-Merge Verification
### CI/Tests
- [ ] All CI checks passing
- [ ] Tests pass locally
- [ ] Coverage acceptable
### Review
- [ ] PR approved
- [ ] All conversations resolved
- [ ] Feedback addressed
### Verification
- [ ] All acceptance criteria verified
- [ ] Verification report posted to issue
- [ ] Issue ready to close
### Branch
- [ ] Up to date with target
- [ ] No merge conflicts
- [ ] Commits clean
### Documentation
- [ ] PR description complete
- [ ] Issue updated
- [ ] Relevant docs updated# Merge with squash (recommended for clean history)
gh pr merge [PR_NUMBER] --squash --delete-branch
# Or merge commit
gh pr merge [PR_NUMBER] --merge --delete-branch
# Or rebase
gh pr merge [PR_NUMBER] --rebase --delete-branch| Strategy | When to Use |
|---|---|
| Squash | Most PRs - creates single clean commit |
| Merge | When commit history is important |
| Rebase | When you want linear history without merge commit |
# Check issue status
gh issue view [ISSUE_NUMBER] --json state
# Should be: "CLOSED"
# If not closed automatically, close it
gh issue close [ISSUE_NUMBER] --comment "Closed by #[PR_NUMBER]"# Update GitHub Project fields
# Status → Done
# (Using project-status-sync)# Switch to main
git checkout main
# Pull merged changes
git pull origin main
# Delete local branch
git branch -d feature/issue-123-description
# Prune remote tracking branches
git remote prune originCannot merge: Review required
→ Request review
→ Address feedback
→ Get approvalCannot merge: CI checks failing
→ Use ci-monitoring skill
→ Fix failures
→ Wait for greenCannot merge: Branch out of date
→ git fetch origin
→ git rebase origin/main
→ Resolve conflicts
→ git push --force-with-leaseCannot merge: Unresolved review threads
→ Address each comment
→ Mark as resolved
→ Re-request review if needed| Situation | Action |
|---|---|
| Tests failing | Fix tests first |
| CI red | Fix CI first |
| Review pending | Wait for review |
| Conflicts exist | Resolve conflicts |
| Acceptance criteria not met | Complete verification |
| Critical feedback unaddressed | Address feedback |
issue-driven-developmentci-monitoringpr-creation