Skip to content

Commit

Permalink
fix: Exclude unnecessary retries for checking PR mergeability (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
y-oksaku authored Sep 9, 2021
1 parent feb8766 commit d753c1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ class GithubScm extends Scm {
try {
const pullRequestInfo = await this.getPrInfo({ scmUri, token, prNum });

if (pullRequestInfo.mergeable) {
return { success: true, pullRequestInfo };
if (pullRequestInfo.mergeable !== null && pullRequestInfo.mergeable !== undefined) {
return { success: pullRequestInfo.mergeable, pullRequestInfo };
}
if (count >= POLLING_MAX_ATTEMPT - 1) {
logger.warn(`Computing mergerbility did not finish. scmUri: ${scmUri}, prNum: ${prNum}`);
Expand Down

0 comments on commit d753c1c

Please sign in to comment.