Skip to content

Commit c21768b

Browse files
committed
fix(network): increase wait delay
1 parent 1c7b945 commit c21768b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,11 @@ async function run() {
338338
owner,
339339
repo,
340340
})) {
341-
await new Promise((resolve) => setTimeout(resolve, 200)); // avoid reaching GitHub API rate limit
342341
const artifact = res.data.find((artifact) => !artifact.expired && artifact.name === baseReport);
343-
if (!artifact)
342+
if (!artifact) {
343+
await new Promise((resolve) => setTimeout(resolve, 800)); // avoid reaching the API rate limit
344344
continue;
345+
}
345346
artifactId = artifact.id;
346347
refCommitHash = artifact.workflow_run?.head_sha;
347348
core.info(`Found artifact named "${baseReport}" with ID "${artifactId}" from commit "${refCommitHash}"`);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ async function run() {
7373
owner,
7474
repo,
7575
})) {
76-
await new Promise((resolve) => setTimeout(resolve, 200)); // avoid reaching GitHub API rate limit
77-
7876
const artifact = res.data.find(
7977
(artifact) => !artifact.expired && artifact.name === baseReport
8078
);
81-
if (!artifact) continue;
79+
if (!artifact) {
80+
await new Promise((resolve) => setTimeout(resolve, 800)); // avoid reaching the API rate limit
81+
82+
continue;
83+
}
8284

8385
artifactId = artifact.id;
8486
refCommitHash = artifact.workflow_run?.head_sha;

0 commit comments

Comments
 (0)