(ctx context.Context, client *github.Client, owner, repo string, resourceID int64)
| 810 | } |
| 811 | |
| 812 | func 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 | |
| 825 | func listWorkflows(ctx context.Context, client *github.Client, owner, repo string, pagination PaginationParams) (*mcp.CallToolResult, any, error) { |
| 826 | opts := &github.ListOptions{ |
no test coverage detected