(runID int64, owner, repo, hostname string)
| 1162 | } |
| 1163 | |
| 1164 | func 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 | |
| 1176 | func classifyWorkflowRunMetadataError(runID int64, err error, output []byte) error { |
| 1177 | outputStr := string(output) |
no outgoing calls
no test coverage detected