From b76d16b0a629458d255f127ea4ab52c95dde8eea Mon Sep 17 00:00:00 2001 From: Alex Leventer Date: Sat, 3 Oct 2020 14:51:32 -0700 Subject: [PATCH] Run build --- dist/app.js | 4 ++-- dist/integrations/Octokit.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dist/app.js b/dist/app.js index c19ae98b..60a80aab 100644 --- a/dist/app.js +++ b/dist/app.js @@ -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]); @@ -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, diff --git a/dist/integrations/Octokit.js b/dist/integrations/Octokit.js index 42f6f2a7..3f3cf14b 100644 --- a/dist/integrations/Octokit.js +++ b/dist/integrations/Octokit.js @@ -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;