| íëĒŠ | ë´ėŠ |
|---|---|
| Category | petmedi-workflow |
| Complexity | simple |
| MCP Servers | zenhub |
/zenhub:manage#
Workflow command for ZenHub issue-PR linking and pipeline state management
Triggers#
- When issue linking is needed after PR creation
- When pipeline state updates are needed
- On work progress state changes
Context Trigger Pattern#
/zenhub:manage {action} [--options]
Actions#
| Action | Description | Example |
|---|---|---|
link-pr |
Link PR to issue | /zenhub:manage link-pr --pr 1627 --issue 1413 |
move |
Move issue to pipeline | /zenhub:manage move --issue 1413 --to "Review/QA" |
status |
Check issue/PR status | /zenhub:manage status --issue 1413 |
Pipeline Query#
Pipeline IDs differ per project workspace. Dynamically queried on first call:
const workspace = await mcp__zenhub__getWorkspacePipelinesAndRepositories();
// workspace.pipelines â [{ id, name }, ...]
// Typical pipelines: New Issues, Icebox, Product Backlog, Sprint Backlog, In Progress, Review/QA, Done
Workflow Patterns#
1. On Work Start#
# Move issue to In Progress
/zenhub:manage move --issue {issue_number} --to " In Progress "
2. After PR Creation#
# Include " Closes #{issue_number} " in PR body (GitHub auto-link)
# Move issue to Review/QA
/zenhub:manage move --issue {issue_number} --to " Review/QA "
3. After Merge#
# Issue auto-closes via " Closes # " keyword in PR body
# No Done pipeline move needed â merge = complete
PR Linking Best Practices#
GitHub Auto-Link Keywords#
Include the following keywords in PR body for GitHub auto-linking:
## Related Issue
- Closes #1413
- Fixes #1413
- Resolves #1413
ZenHub Linking Limitations#
- PRs cannot be set as children of issues in ZenHub
- Using GitHub's "Closes #" keyword is recommended
- In ZenHub, manage state via pipeline moves
MCP Tool Usage#
Issue Search#
mcp__zenhub__searchLatestIssues({ query: " 1413 " })
Pipeline Move#
// Query workspace info (on first call)
const workspace = await mcp__zenhub__getWorkspacePipelinesAndRepositories();
const reviewPipeline = workspace.pipelines.find(p = > p.name === " Review/QA " );
mcp__zenhub__moveIssueToPipeline({
issueId: " {issue_graphql_id} " ,
pipelineId: reviewPipeline.id
})
Repository / Issue Type / Organization Query#
All IDs differ per project workspace. Dynamically query based on the X-zh-workspace header configured in
.mcp.json:
// Repository ID + Pipeline ID
const workspace = await mcp__zenhub__getWorkspacePipelinesAndRepositories();
// Issue Type ID
const issueTypes = await mcp__zenhub__getIssueTypes();
Key Rules#
- On PR Creation: Include
Closes #{issue}in body - On Work Start: Move to In Progress
- On Review Request: Move to Review/QA
- After Merge: Issue auto-closes via GitHub "Closes #" keyword (ignore Done pipeline)
- Epic Structure: Maintain Epic > Story > Sub-task hierarchy