LogoSkills

zenhub:manage

ZenHub PR linking and pipeline state management

항ëĒŠë‚´ėšŠ
Categorypetmedi-workflow
Complexitysimple
MCP Serverszenhub

/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#

ActionDescriptionExample
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#

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#

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#

  1. On PR Creation: Include Closes #{issue} in body
  2. On Work Start: Move to In Progress
  3. On Review Request: Move to Review/QA
  4. After Merge: Issue auto-closes via GitHub "Closes #" keyword (ignore Done pipeline)
  5. Epic Structure: Maintain Epic > Story > Sub-task hierarchy