We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7943514 commit 77569ecCopy full SHA for 77569ec
1 file changed
handlers/merge_prs.js
@@ -85,14 +85,20 @@ export async function mergePrs(request, env) {
85
appToken
86
);
87
88
- if (!mergeableState.mergeable && mergeableState.retryable) {
89
- await delay(1000);
+ // 최대 3번 재시도 (총 4번 조회, 최대 6초 대기)
+ let retries = 0;
90
+ const MAX_RETRIES = 3;
91
+ const RETRY_DELAY = 2000; // 2초
92
+
93
+ while (!mergeableState.mergeable && mergeableState.retryable && retries < MAX_RETRIES) {
94
+ await delay(RETRY_DELAY);
95
mergeableState = await getMergeableState(
96
repoOwner,
97
repoName,
98
pr.number,
99
100
101
+ retries++;
102
}
103
104
if (!mergeableState.mergeable) {
0 commit comments