Skip to content

Commit

Permalink
return if job does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
TomChv committed Jul 29, 2020
1 parent c39a413 commit 52f7021
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3582,7 +3582,13 @@ exports.poll = (options) => __awaiter(void 0, void 0, void 0, function* () {
});
log(`Retrieved ${result.data.check_runs.length} check runs named ${checkName}`);
const check = result.data.check_runs;
log(`actual check: ${check}------\n------\n`);
if (!check || !check.length) {
log("check does not exist");
return 'does not exist';
}
else {
log("check exist");
}
const completedCheck = result.data.check_runs.find(checkRun => checkRun.status === 'completed');
if (completedCheck) {
log(`Found a completed check with id ${completedCheck.id} and conclusion ${completedCheck.conclusion}`);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 52f7021

Please sign in to comment.