@samitouri / QOS-React-1 / commits / c70ab3f4b0

[ci] getWorkflowRun should not throw early if workflow hasn't completed (#31861)

We already have handling and retry logic for in-flight workflows in `downloadArtifactsFromGitHub`, so there's no need to exit early if we find a workflow for a given commit but it hasn't finished yet.

lauren committed Dec 19, 2024 at 13:03 UTC c70ab3f4b051348e3dd91144d9c7299a2e2311a5
1 file changed +1 -6
scripts/release/shared-commands/download-build-artifacts.js
+1 -6
@@ -43,12 +43,7 @@ async function getWorkflowRun(commit) {
43 );
44
45 const json = JSON.parse(res.stdout);
46 - const workflowRun = json.workflow_runs.find(
47 - run =>
48 - run.head_sha === commit &&
49 - run.status === 'completed' &&
50 - run.conclusion === 'success'
51 - );
46 + const workflowRun = json.workflow_runs.find(run => run.head_sha === commit);
47
48 if (workflowRun == null || workflowRun.id == null) {
49 console.log(