move
Change GitHub pull request status to attention, waiting, shelved, or auto states to manage open source contribution workflow.
Instructions
Move a PR between states: attention (need attention), waiting (waiting on maintainer), shelved (hidden), or auto (reset to computed status).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prUrl | Yes | Full GitHub PR URL | |
| target | Yes | Target state for the PR |
Implementation Reference
- packages/core/src/commands/move.ts:30-82 (handler)The implementation of the `runMove` function, which handles the logic for transitioning a PR between states (attention, waiting, shelved, or auto).
export async function runMove(options: { prUrl: string; target: string }): Promise<MoveOutput> { validateUrl(options.prUrl); validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR'); const target = options.target as MoveTarget; if (!VALID_TARGETS.includes(target)) { throw new Error(`Invalid target "${options.target}". Must be one of: ${VALID_TARGETS.join(', ')}`); } const stateManager = getStateManager(); switch (target) { case 'attention': case 'waiting': { const status = target === 'attention' ? 'needs_addressing' : 'waiting_on_maintainer'; const label = target === 'attention' ? 'Need Attention' : 'Waiting on Maintainer'; // Use current time — the CLI doesn't have cached PR data. The override // will auto-clear on the next daily run if the PR has new activity after this. const lastActivityAt = new Date().toISOString(); stateManager.batch(() => { stateManager.setStatusOverride(options.prUrl, status, lastActivityAt); stateManager.unshelvePR(options.prUrl); }); return { url: options.prUrl, target, description: `Moved to ${label}` }; } case 'shelved': { stateManager.batch(() => { stateManager.shelvePR(options.prUrl); stateManager.clearStatusOverride(options.prUrl); }); return { url: options.prUrl, target, description: 'Shelved — excluded from capacity and actionable items', }; } case 'auto': { stateManager.batch(() => { stateManager.clearStatusOverride(options.prUrl); stateManager.unshelvePR(options.prUrl); }); return { url: options.prUrl, target, description: 'Reset to computed status', }; } default: { const _exhaustive: never = target; throw new Error(`Unhandled move target: ${_exhaustive}`); } } } - The `MoveOutput` interface defining the structure of the data returned by the move operation.
export interface MoveOutput { url: string; target: MoveTarget; /** Human-readable description of what happened. */ description: string; } - packages/mcp-server/src/tools.ts:336-349 (registration)The MCP tool registration for the 'move' command, which binds the 'move' tool to the `runMove` handler and defines its Zod input schema.
// 20. move — Move a PR between states server.registerTool( 'move', { description: 'Move a PR between states: attention (need attention), waiting (waiting on maintainer), shelved (hidden), or auto (reset to computed status).', inputSchema: { prUrl: z.string().describe('Full GitHub PR URL'), target: z.enum(['attention', 'waiting', 'shelved', 'auto']).describe('Target state for the PR'), }, annotations: { readOnlyHint: false, destructiveHint: false }, }, wrapTool(runMove), );