get_combined_status
Retrieve the combined status of a GitHub commit to check CI/CD pipeline results and deployment readiness for a specific repository reference.
Instructions
Get the combined status for a commit
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name | |
| ref | Yes | The ref (SHA, branch name, or tag name) to get the combined status for |
Implementation Reference
- src/operations/statuses.ts:107-119 (handler)Core handler function that executes the tool logic: fetches combined commit status from GitHub API and parses with Zod schema.export async function getCombinedStatus( github_pat: string, owner: string, repo: string, ref: string ): Promise<z.infer<typeof CombinedStatusResponseSchema>> { const response = await githubRequest( github_pat, `https://api.github.com/repos/${owner}/${repo}/commits/${ref}/status` ); return CombinedStatusResponseSchema.parse(response); }
- src/operations/statuses.ts:44-52 (schema)Input schemas: public schema for tool registration and internal schema (with PAT) for parsing tool call arguments.export const GetCombinedStatusSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), ref: z.string().describe("The ref (SHA, branch name, or tag name) to get the combined status for") }); export const _GetCombinedStatusSchema = GetCombinedStatusSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
- src/operations/statuses.ts:94-105 (schema)Output schema used to validate and type the GitHub combined status API response.export const CombinedStatusResponseSchema = z.object({ state: z.string(), statuses: z.array(CommitStatusSchema), sha: z.string(), total_count: z.number(), repository: z.object({ id: z.number(), name: z.string(), full_name: z.string(), owner: z.any(), }), });
- src/index.ts:221-225 (registration)Tool registration in the MCP server's ListTools response, defining name, description, and input schema.{ name: "get_combined_status", description: "Get the combined status for a commit", inputSchema: zodToJsonSchema(statuses.GetCombinedStatusSchema), },
- src/index.ts:638-645 (handler)MCP CallTool handler case: parses arguments and delegates to the core getCombinedStatus implementation.case "get_combined_status": { const args = statuses._GetCombinedStatusSchema.parse(params.arguments); const { github_pat, owner, repo, ref } = args; const result = await statuses.getCombinedStatus(github_pat, owner, repo, ref); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }