MCPcopy Index your code
hub / github.com/github/github-mcp-server / getWorkflowRun

Function getWorkflowRun

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

Source from the content-addressed store, hash-verified

797}
798
799func getWorkflowRun(ctx context.Context, client *github.Client, owner, repo string, resourceID int64) (*mcp.CallToolResult, any, error) {
800 workflowRun, resp, err := client.Actions.GetWorkflowRunByID(ctx, owner, repo, resourceID)
801 if err != nil {
802 return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to get workflow run", resp, err), nil, nil
803 }
804 defer func() { _ = resp.Body.Close() }()
805 r, err := json.Marshal(workflowRun)
806 if err != nil {
807 return nil, nil, fmt.Errorf("failed to marshal workflow run: %w", err)
808 }
809 return utils.NewToolResultText(string(r)), nil, nil
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)

Callers 1

ActionsGetFunction · 0.85

Calls 2

NewToolResultTextFunction · 0.92
CloseMethod · 0.80

Tested by

no test coverage detected