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

Function deleteWorkflowRunLogs

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

Source from the content-addressed store, hash-verified

1126}
1127
1128func 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}

Callers 1

ActionsRunTriggerFunction · 0.85

Calls 2

NewToolResultTextFunction · 0.92
CloseMethod · 0.80

Tested by

no test coverage detected