Retry only on fail lol

Signed-off-by: Tejas Kumar <tejask@spotify.com>
This commit is contained in:
Tejas Kumar
2021-05-19 10:59:41 +02:00
parent 6c18028458
commit 903f3317ed
@@ -109,9 +109,9 @@ export const enableBranchProtectionOnDefaultRepoBranch = async ({
if (!e.message.includes('Branch not found')) {
throw e;
}
}
// GitHub has eventual consistency. Fail silently, wait, and try again.
await new Promise(resolve => setTimeout(resolve, 600));
await tryOnce();
// GitHub has eventual consistency. Fail silently, wait, and try again.
await new Promise(resolve => setTimeout(resolve, 600));
await tryOnce();
}
};