MCPcopy Create free account
hub / github.com/github/gh-aw / buildWorkflowRunMetadataArgs

Function buildWorkflowRunMetadataArgs

pkg/cli/audit.go:1164–1174  ·  view source on GitHub ↗
(runID int64, owner, repo, hostname string)

Source from the content-addressed store, hash-verified

1162}
1163
1164func buildWorkflowRunMetadataArgs(runID int64, owner, repo, hostname string) []string {
1165 endpoint := fmt.Sprintf("repos/{owner}/{repo}/actions/runs/%d", runID)
1166 if owner != "" && repo != "" {
1167 endpoint = fmt.Sprintf("repos/%s/%s/actions/runs/%d", owner, repo, runID)
1168 }
1169 args := []string{"api"}
1170 if hostname != "" && hostname != "github.com" {
1171 args = append(args, "--hostname", hostname)
1172 }
1173 return append(args, endpoint, "--jq", "{databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, headSha: .head_sha, displayTitle: .display_title}")
1174}
1175
1176func classifyWorkflowRunMetadataError(runID int64, err error, output []byte) error {
1177 outputStr := string(output)

Callers 1

fetchWorkflowRunMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected