Skip to content

Commit c78f750

Browse files
committed
feat(12-04): add missing case handlers for all tools
- Add 18 missing case handlers to executeToolHandler - Add Phase 8 lifecycle tools (close/reopen/convert) - Add Phase 8 advanced tools (position/search/filter) - Add Phase 10 Sprint AI tools (capacity/prioritize/risk/suggest) - Add Phase 10 Roadmap AI tools (generate/visualization) - Add Phase 11 Issue Intelligence tools (enrich/labels/duplicates/related) - Add health_check handler - Add create_project_field handler with service delegation - Register Issue Intelligence tools in ToolRegistry - Total: 122 case handlers covering all registered tools
1 parent f080298 commit c78f750

4 files changed

Lines changed: 107 additions & 0 deletions

File tree

src/index.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,67 @@ class GitHubProjectManagerServer {
726726
case "list_linked_teams":
727727
return await executeListLinkedTeams(args);
728728

729+
// Phase 8 - Project Lifecycle
730+
case "close_project":
731+
return await executeCloseProject(args);
732+
733+
case "reopen_project":
734+
return await executeReopenProject(args);
735+
736+
case "convert_draft_issue":
737+
return await executeConvertDraftIssue(args);
738+
739+
// Phase 8 - Advanced Operations
740+
case "update_item_position":
741+
return await executeUpdateItemPosition(args);
742+
743+
case "search_issues_advanced":
744+
return await executeSearchIssuesAdvanced(args);
745+
746+
case "filter_project_items":
747+
return await executeFilterProjectItems(args);
748+
749+
// Phase 10 - Sprint AI
750+
case "calculate_sprint_capacity":
751+
return await executeCalculateSprintCapacity(args);
752+
753+
case "prioritize_backlog":
754+
return await executePrioritizeBacklog(args);
755+
756+
case "assess_sprint_risk":
757+
return await executeAssessSprintRisk(args);
758+
759+
case "suggest_sprint_composition":
760+
return await executeSuggestSprintComposition(args);
761+
762+
// Phase 10 - Roadmap AI
763+
case "generate_ai_roadmap":
764+
return await executeGenerateRoadmap(args);
765+
766+
case "generate_roadmap_visualization":
767+
return await executeGenerateRoadmapVisualization(args);
768+
769+
// Phase 11 - Issue Intelligence
770+
case "enrich_issue_ai":
771+
return await executeEnrichIssue(args);
772+
773+
case "suggest_labels":
774+
return await executeSuggestLabels(args);
775+
776+
case "detect_duplicates":
777+
return await executeDetectDuplicates(args);
778+
779+
case "find_related_issues":
780+
return await executeFindRelatedIssues(args);
781+
782+
// Health
783+
case "health_check":
784+
return await executeHealthCheck();
785+
786+
// Project Field (delegates to service)
787+
case "create_project_field":
788+
return await this.service.createProjectField(args);
789+
729790
default:
730791
throw new McpError(
731792
ErrorCode.MethodNotFound,

src/infrastructure/tools/ToolRegistry.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ import {
203203
generateRoadmapVisualizationTool,
204204
} from "./roadmap-ai-tools.js";
205205

206+
// Issue Intelligence tools (Phase 11: AI-17 to AI-20)
207+
import {
208+
enrichIssueTool as enrichIssueAITool,
209+
suggestLabelsTool,
210+
detectDuplicatesTool,
211+
findRelatedIssuesTool,
212+
} from "./issue-intelligence-tools.js";
213+
206214
/**
207215
* Central registry of all available tools
208216
*/
@@ -444,6 +452,14 @@ export class ToolRegistry {
444452
// Register Roadmap AI tools (Phase 10: AI-13 to AI-16)
445453
this.registerTool(generateAIRoadmapTool);
446454
this.registerTool(generateRoadmapVisualizationTool);
455+
456+
// Register Issue Intelligence tools (Phase 11: AI-17 to AI-20)
457+
// Note: enrichIssueAITool uses same name "enrich_issue" as ToolSchemas version
458+
// so it will be overwritten with the AI-powered implementation
459+
this.registerTool(enrichIssueAITool);
460+
this.registerTool(suggestLabelsTool);
461+
this.registerTool(detectDuplicatesTool);
462+
this.registerTool(findRelatedIssuesTool);
447463
}
448464

449465
/**

src/services/ProjectManagementService.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ export class ProjectManagementService {
347347
return this.templateService.listProjectFields(data);
348348
}
349349

350+
async createProjectField(data: { projectId: string; name: string; type: string; options?: Array<{ name: string; color?: string; description?: string }> }): Promise<CustomField> {
351+
return this.templateService.createProjectField(data);
352+
}
353+
350354
async updateProjectField(data: { projectId: string; fieldId: string; name?: string; options?: Array<{ id?: string; name: string; color?: string; description?: string }> }): Promise<CustomField> {
351355
return this.templateService.updateProjectField(data);
352356
}

src/services/ProjectTemplateService.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,32 @@ export class ProjectTemplateService {
145145
}
146146
}
147147

148+
async createProjectField(data: {
149+
projectId: string;
150+
name: string;
151+
type: string;
152+
options?: Array<{
153+
name: string;
154+
color?: string;
155+
description?: string;
156+
}>;
157+
}): Promise<CustomField> {
158+
try {
159+
return await this.projectRepo.createField(data.projectId, {
160+
name: data.name,
161+
type: data.type as CustomField['type'],
162+
options: data.options?.map(opt => ({
163+
id: '', // Will be assigned by GitHub
164+
name: opt.name,
165+
color: opt.color,
166+
description: opt.description
167+
}))
168+
});
169+
} catch (error) {
170+
throw this.mapErrorToMCPError(error);
171+
}
172+
}
173+
148174
async updateProjectField(data: {
149175
projectId: string;
150176
fieldId: string;

0 commit comments

Comments
 (0)