Skip to content

Commit

Permalink
add new dist
Browse files Browse the repository at this point in the history
  • Loading branch information
TomChv committed Jul 30, 2020
1 parent 223978c commit 727f9aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3569,10 +3569,10 @@ const wait_1 = __webpack_require__(521);
exports.poll = (options) => __awaiter(void 0, void 0, void 0, function* () {
const { client, log, checkName, timeoutSeconds, intervalSeconds, owner, repo, ref } = options;
let now = new Date().getTime();
const deadline = now + timeoutSeconds * 1000;
let deadline = now + timeoutSeconds * 1000;
while (now <= deadline) {
log(`--------------------------\n
Retrieving check runs named ${checkName} on ${owner}/${repo}@${ref}...`);
log('-----------------');
log(`Retrieving check runs named ${checkName} on ${owner}/${repo}@${ref}...`);
const result = yield client.checks.listForRef({
// eslint-disable-next-line camelcase
check_name: checkName,
Expand All @@ -3583,14 +3583,15 @@ 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;
if (!check || !check.length) {
log(`${checkName} job does not exist : stop wait`);
log(`${checkName} job does not exist. Abort waiting`);
return 'not found';
}
else {
log(`${checkName} job find`);
}
if (check.find(checkRun => checkRun.status === 'queued')) {
log(`${checkName} job is in queue`);
deadline = now + timeoutSeconds * 1000;
}
if (check.find(checkRun => checkRun.status === 'in_progress')) {
log(`${checkName} job is in progress`);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 727f9aa

Please sign in to comment.