Skip to content

Commit 20c7c8f

Browse files
authored
chore(ci): Add an initial delay to let gitflow ci start before checking mergeability (#18383)
I think this action ran through faster than it took the Gitflow PR CI to start which is why it immediately detected a mergable state and finished running without reporting an issue. The action now waits a minute before starting its check. Closes #18384
1 parent f271bbb commit 20c7c8f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/gitflow-merge-conflict.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
uses: actions/github-script@v8
2020
with:
2121
script: |
22+
const initialDelay = 60_000; // Wait 1 minute before first check to let CI start
2223
const retryInterval = 30_000;
2324
const maxRetries = 10; // (30 seconds * 10 retries) = 5 minutes
2425
@@ -39,6 +40,10 @@ jobs:
3940
let attempt = 0;
4041
let mergeable = null;
4142
43+
// Wait before first check to give CI time to start
44+
console.log(`Waiting ${initialDelay/1000} seconds before first check to let CI start...`);
45+
await sleep(initialDelay);
46+
4247
while (attempt < maxRetries) {
4348
attempt++;
4449
console.log(`Attempt ${attempt}/${maxRetries}: Checking if PR is mergeable...`);

0 commit comments

Comments
 (0)