(commit)
| 47 | } |
| 48 | |
| 49 | async function getWorkflowRun(commit) { |
| 50 | const res = await exec( |
| 51 | `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}` |
| 52 | ); |
| 53 | |
| 54 | const json = JSON.parse(res.stdout); |
| 55 | const workflowRun = json.workflow_runs.find(run => run.head_sha === commit); |
| 56 | |
| 57 | if (workflowRun == null || workflowRun.id == null) { |
| 58 | console.log( |
| 59 | theme`{error The workflow run for the specified commit (${commit}) could not be found.}` |
| 60 | ); |
| 61 | process.exit(1); |
| 62 | } |
| 63 | |
| 64 | return workflowRun; |
| 65 | } |
| 66 | |
| 67 | async function getArtifact(workflowRunId, artifactName) { |
| 68 | const res = await exec( |
no test coverage detected