MCPcopy
hub / github.com/github/github-mcp-server / getWorkflowJob

Function getWorkflowJob

pkg/github/actions.go:812–823  ·  view source on GitHub ↗
(ctx context.Context, client *github.Client, owner, repo string, resourceID int64)

Source from the content-addressed store, hash-verified

810}
811
812func getWorkflowJob(ctx context.Context, client *github.Client, owner, repo string, resourceID int64) (*mcp.CallToolResult, any, error) {
813 workflowJob, resp, err := client.Actions.GetWorkflowJobByID(ctx, owner, repo, resourceID)
814 if err != nil {
815 return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to get workflow job", resp, err), nil, nil
816 }
817 defer func() { _ = resp.Body.Close() }()
818 r, err := json.Marshal(workflowJob)
819 if err != nil {
820 return nil, nil, fmt.Errorf("failed to marshal workflow job: %w", err)
821 }
822 return utils.NewToolResultText(string(r)), nil, nil
823}
824
825func listWorkflows(ctx context.Context, client *github.Client, owner, repo string, pagination PaginationParams) (*mcp.CallToolResult, any, error) {
826 opts := &github.ListOptions{

Callers 1

ActionsGetFunction · 0.85

Calls 2

NewToolResultTextFunction · 0.92
CloseMethod · 0.80

Tested by

no test coverage detected