(ctx context.Context, client *github.Client, owner, repo string, runID int64)
| 1126 | } |
| 1127 | |
| 1128 | func deleteWorkflowRunLogs(ctx context.Context, client *github.Client, owner, repo string, runID int64) (*mcp.CallToolResult, any, error) { |
| 1129 | resp, err := client.Actions.DeleteWorkflowRunLogs(ctx, owner, repo, runID) |
| 1130 | if err != nil { |
| 1131 | return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to delete workflow run logs", resp, err), nil, nil |
| 1132 | } |
| 1133 | defer func() { _ = resp.Body.Close() }() |
| 1134 | |
| 1135 | result := map[string]any{ |
| 1136 | "message": "Workflow run logs have been deleted", |
| 1137 | "run_id": runID, |
| 1138 | "status": resp.Status, |
| 1139 | "status_code": resp.StatusCode, |
| 1140 | } |
| 1141 | |
| 1142 | r, err := json.Marshal(result) |
| 1143 | if err != nil { |
| 1144 | return nil, nil, fmt.Errorf("failed to marshal response: %w", err) |
| 1145 | } |
| 1146 | |
| 1147 | return utils.NewToolResultText(string(r)), nil, nil |
| 1148 | } |
no test coverage detected