Skip to content

Commit

Permalink
Run build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexleventer committed Oct 3, 2020
1 parent bc5d1c1 commit b76d16b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports.run = () => __awaiter(void 0, void 0, void 0, function* () {
const ok = new Octokit_1.default(githubToken);
const issues = yield ok.listAllOpenIssues(github_1.context.repo.owner, github_1.context.repo.repo);
const results = yield ok.getIssuesWithDueDate(issues);
results.forEach((issue) => __awaiter(void 0, void 0, void 0, function* () {
for (const issue of results) {
const daysUtilDueDate = yield dateUtils_1.datesToDue(issue.due);
if (daysUtilDueDate <= 7 && daysUtilDueDate > 0) {
yield ok.addLabelToIssue(github_1.context.repo.owner, github_1.context.repo.repo, issue.number, [constants_1.NEXT_WEEK_TAG_NAME]);
Expand All @@ -55,7 +55,7 @@ exports.run = () => __awaiter(void 0, void 0, void 0, function* () {
yield ok.removeLabelFromIssue(github_1.context.repo.owner, github_1.context.repo.repo, constants_1.NEXT_WEEK_TAG_NAME, issue.number);
yield ok.addLabelToIssue(github_1.context.repo.owner, github_1.context.repo.repo, issue.number, [constants_1.OVERDUE_TAG_NAME]);
}
}));
}
return {
ok: true,
issuesProcessed: results.length,
Expand Down
10 changes: 10 additions & 0 deletions dist/integrations/Octokit.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,15 @@ class Octokit {
});
});
}
createIssue(options) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.client.issues.create(options);
});
}
updateIssue(options) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.client.issues.update(options);
});
}
}
exports.default = Octokit;

0 comments on commit b76d16b

Please sign in to comment.