Manage pull request lifecycle including reviews, updates, merging, and closing.
/plugin marketplace add marcel-Ngan/ai-dev-team/plugin install marcel-ngan-ai-dev-team@marcel-Ngan/ai-dev-teamThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Manage pull request lifecycle including reviews, updates, merging, and closing.
git CLI commandsgh CLI (GitHub CLI){
"owner": "{{github.owner}}",
"repo": "{{github.repo}}",
"defaultBranch": "{{github.defaultBranch}}"
}
Draft → Open → In Review → Changes Requested → Approved → Merged
↓
Closed (without merge)
| Current | Action | Next |
|---|---|---|
| Draft | Mark ready | Open |
| Open | Request review | In Review |
| In Review | Approve | Approved |
| In Review | Request changes | Changes Requested |
| Changes Requested | Push updates | In Review |
| Approved | Merge | Merged |
| Any | Close | Closed |
# List open PRs
gh pr list
# List PRs needing review
gh pr list --search "review-requested:@me"
# List your PRs
gh pr list --author "@me"
# List with filters
gh pr list --state open --label "bug" --limit 10
# View specific PR
gh pr view 123
# View PR diff
gh pr diff 123
# View PR checks
gh pr checks 123
# Open PR in browser
gh pr view 123 --web
# Edit title
gh pr edit 123 --title "New title"
# Edit body
gh pr edit 123 --body "New description"
# Add/remove labels
gh pr edit 123 --add-label "ready-for-review"
gh pr edit 123 --remove-label "work-in-progress"
# Add/remove reviewers
gh pr edit 123 --add-reviewer @username
gh pr edit 123 --remove-reviewer @username
# Add/remove assignees
gh pr edit 123 --add-assignee @username
# Set milestone
gh pr edit 123 --milestone "v1.0"
# Convert draft to ready
gh pr ready 123
# Convert to draft
gh pr ready 123 --undo
# Merge (default strategy)
gh pr merge 123
# Merge with squash
gh pr merge 123 --squash
# Merge with rebase
gh pr merge 123 --rebase
# Merge and delete branch
gh pr merge 123 --delete-branch
# Auto-merge when checks pass
gh pr merge 123 --auto --squash
# Disable auto-merge
gh pr merge 123 --disable-auto
# Close without merging
gh pr close 123
# Close with comment
gh pr close 123 --comment "Closing - superseded by #456"
# Reopen closed PR
gh pr reopen 123
## Review Response Process
1. **Read all comments** - Understand the full feedback
2. **Acknowledge** - Respond to each comment
3. **Make changes** - Address requested changes
4. **Push updates** - Commit and push
5. **Re-request review** - Notify reviewers
# Make changes locally
git add .
git commit -m "fix: address review comments"
# Push to PR branch
git push
# Or amend if fixing small issues (unpushed commits only)
git commit --amend --no-edit
git push --force-with-lease
# Request re-review via gh
gh pr edit 123 --add-reviewer @reviewer
# Or via comment
gh pr comment 123 --body "@reviewer Changes addressed, ready for re-review"
# Update base branch
git checkout {{github.defaultBranch}}
git pull origin {{github.defaultBranch}}
# Go back to feature branch
git checkout feature/my-branch
# Merge base into feature (or rebase)
git merge {{github.defaultBranch}}
# OR
git rebase {{github.defaultBranch}}
# Resolve conflicts in files
# Edit conflicted files, then:
git add <resolved-files>
# Complete merge
git commit
# OR for rebase
git rebase --continue
# Push updates
git push
# If rebased, may need:
git push --force-with-lease
## Merge Conflict Resolution
**PR:** #{{prNumber}}
**Conflicting Files:**
{{#each files}}
- {{file}}
{{/each}}
**Resolution Approach:**
{{resolutionDescription}}
**Changes Made:**
{{#each resolutions}}
- {{file}}: {{resolution}}
{{/each}}
**Verification:**
- [ ] Build passes
- [ ] Tests pass
- [ ] Manually verified affected functionality
| Label | Purpose | Color |
|---|---|---|
bug | Bug fix | Red |
feature | New feature | Green |
documentation | Docs only | Blue |
breaking-change | Breaking change | Orange |
needs-review | Ready for review | Yellow |
changes-requested | Has review feedback | Purple |
approved | Approved, ready to merge | Green |
do-not-merge | Not ready | Red |
work-in-progress | Still in progress | Gray |
# Add label
gh pr edit 123 --add-label "needs-review"
# Remove label
gh pr edit 123 --remove-label "work-in-progress"
# Multiple labels
gh pr edit 123 --add-label "bug,priority-high,needs-review"
| Strategy | Use When | Result |
|---|---|---|
| Merge Commit | Preserve full history | Merge commit created |
| Squash | Clean single commit | All commits squashed |
| Rebase | Linear history | Commits replayed |
## Merge Strategy Guidelines
**Use Squash when:**
- Many small "fix" commits
- WIP commits in history
- Single logical change
**Use Merge Commit when:**
- Multiple logical commits
- Want to preserve history
- Large feature with milestones
**Use Rebase when:**
- Want linear history
- Small, clean commits
- Team convention
# Add comment to PR
gh pr comment 123 --body "Comment text"
# Add review comment
gh pr review 123 --comment --body "General feedback"
# Approve with comment
gh pr review 123 --approve --body "LGTM!"
# Request changes with comment
gh pr review 123 --request-changes --body "Please address..."
## Approval Comment
LGTM!
**Reviewed:**
- [x] Code quality
- [x] Test coverage
- [x] Documentation
Ship it! 🚀
---
## Changes Requested Comment
Thanks for the PR! A few items to address:
### Required Changes
1. {{change1}}
2. {{change2}}
### Suggestions (non-blocking)
- {{suggestion1}}
Let me know when ready for re-review.
// PR merged - transition story
Atlassian:addCommentToJiraIssue({
cloudId: "{{jira.cloudId}}",
issueIdOrKey: "{{storyKey}}",
commentBody: `🤖 **Developer Agent** - PR Merged
**PR:** [#{{prNumber}}]({{prUrl}}) merged to {{baseBranch}}
**Merge Type:** {{mergeType}}
**By:** {{mergedBy}}
Code is now in {{baseBranch}} and will be deployed with next release.`
})
| Agent | PR Management Use |
|---|---|
| Senior Developer | Reviews, approves, merges PRs |
| Junior Developer | Responds to feedback, updates PRs |
| DevOps Engineer | Manages deployment PRs |
| Project Manager | Tracks PR status |
| Error | Cause | Resolution |
|---|---|---|
| PR not mergeable | Conflicts exist | Resolve merge conflicts |
| Required checks failing | CI failed | Fix failing checks |
| Required reviews missing | Need approvals | Request reviews |
| Branch protection | Rules not met | Meet all requirements |
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.