File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ jobs:
139
139
140
140
let i = 0;
141
141
142
- while (pr.mergeable == null || i >= 60) {
142
+ while (pr.mergeable == null && i < 60) {
143
143
console.log("get pull-request status");
144
144
145
145
let result = await github.rest.pulls.get({
@@ -158,6 +158,11 @@ jobs:
158
158
159
159
console.log("pr.mergeable=%o", pr.mergeable);
160
160
161
+ if (pr.mergeable === null) {
162
+ core.setFailed("Unable to check if the PR is mergeable, please re-run the check.");
163
+ return false;
164
+ }
165
+
161
166
const { data : comments } = await github.rest.issues.listComments({
162
167
issue_number : context.issue.number,
163
168
owner : context.repo.owner,
@@ -166,7 +171,7 @@ jobs:
166
171
167
172
const commentToUpdate = comments.find(comment => comment.body.startsWith(header));
168
173
169
- if (pr.mergeable === false ) {
174
+ if (! pr.mergeable) {
170
175
let commentParams = {
171
176
...context.repo,
172
177
issue_number : context.issue.number,
You can’t perform that action at this time.
0 commit comments