You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/functions/prechecks.js
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,8 @@ export async function prechecks(
245
245
// CI checks are set to be bypassed and the PR has not been reviewed
246
246
}elseif(
247
247
commitStatus==='skip_ci'&&
248
-
reviewDecision==='REVIEW_REQUIRED'
248
+
(reviewDecision==='REVIEW_REQUIRED'||
249
+
reviewDecision==='CHANGES_REQUESTED')
249
250
){
250
251
message=`### ⚠️ Cannot proceed with operation\n\n> CI checks are not required for this operation but the PR has not been reviewed`
251
252
return{message: message,status: false}
@@ -257,7 +258,8 @@ export async function prechecks(
257
258
258
259
// If CI is passing but the PR has not been reviewed
259
260
}elseif(
260
-
reviewDecision==='REVIEW_REQUIRED'&&
261
+
(reviewDecision==='REVIEW_REQUIRED'||
262
+
reviewDecision==='CHANGES_REQUESTED')&&
261
263
commitStatus==='SUCCESS'
262
264
){
263
265
message=`### ⚠️ Cannot proceed with operation\n\n> CI checks are passing but the PR has not been reviewed`
@@ -270,7 +272,8 @@ export async function prechecks(
270
272
271
273
// If CI is pending and the PR has not been reviewed
272
274
}elseif(
273
-
reviewDecision==='REVIEW_REQUIRED'&&
275
+
(reviewDecision==='REVIEW_REQUIRED'||
276
+
reviewDecision==='CHANGES_REQUESTED')&&
274
277
commitStatus==='PENDING'
275
278
){
276
279
message=`### ⚠️ Cannot proceed with operation\n\n- reviewDecision: \`${reviewDecision}\`\n- commitStatus: \`${commitStatus}\`\n\n> CI is still in a pending state and reviews are also required for this operation`
@@ -282,7 +285,11 @@ export async function prechecks(
282
285
return{message: message,status: false}
283
286
284
287
// If CI is undefined and the PR has not been reviewed
message=`### ⚠️ Cannot proceed with operation\n\n- reviewDecision: \`${reviewDecision}\`\n- commitStatus: \`${commitStatus}\`\n\n> CI checks have not been defined but reviews are required for this operation`
0 commit comments