()
| 35 | } |
| 36 | |
| 37 | function getWorkflowId() { |
| 38 | if ( |
| 39 | existsSync(join(__dirname, `../../../.github/workflows/${WORKFLOW_ID}`)) |
| 40 | ) { |
| 41 | return WORKFLOW_ID; |
| 42 | } else { |
| 43 | throw new Error( |
| 44 | `Incorrect workflow ID: .github/workflows/${WORKFLOW_ID} does not exist. Please check the name of the workflow being downloaded from.` |
| 45 | ); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | async function getWorkflowRun(commit) { |
| 50 | const res = await exec( |