diff --git a/dist/index.js b/dist/index.js index c2a3f1e..161fbc0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31632,7 +31632,10 @@ const core = __importStar(__nccwpck_require__(2186)); const date_fns_1 = __nccwpck_require__(3314); function processBranch(plan, branch, commitComments, params) { return __awaiter(this, void 0, void 0, function* () { - console.log("-> branch was last updated by " + branch.username + " on " + branch.date); + console.log("-> branch was last updated by " + + branch.username + + " on " + + (0, formatISO_1.default)(branch.date)); if (plan.action === "skip") { console.log(plan.reason); return; @@ -31651,13 +31654,13 @@ function processBranch(plan, branch, commitComments, params) { commentBody: commitComments_1.TaggedCommitComments.formatCommentMessage(params.staleCommentMessage, branch, params, params.repo), }); } - console.log("-> branch was marked stale on " + plan.lastCommentTime); + console.log("-> branch was marked stale on " + (0, formatISO_1.default)(plan.lastCommentTime)); if (plan.action === "keep stale") { console.log("-> branch will be removed on " + (0, formatISO_1.default)(plan.cutoffTime)); return; } if (plan.action === "remove") { - console.log("-> branch was slated for deletion on " + plan.cutoffTime); + console.log("-> branch was slated for deletion on " + (0, formatISO_1.default)(plan.cutoffTime)); console.log("-> removing branch"); if (params.isDryRun) { console.log("-> (doing nothing because of dry run flag)"); @@ -31715,9 +31718,18 @@ function planBranchAction(now, branch, filters, commitComments, params) { }, 0); const cutoffTime = (0, date_fns_1.addDays)(latestStaleComment, params.daysBeforeBranchDelete).getTime(); if (latestStaleComment <= filters.removeCutoff) { - return { action: "keep stale", cutoffTime, lastCommentTime: latestStaleComment }; + return { + action: "keep stale", + cutoffTime, + lastCommentTime: latestStaleComment, + }; } - return { action: "remove", comments, cutoffTime, lastCommentTime: latestStaleComment }; + return { + action: "remove", + comments, + cutoffTime, + lastCommentTime: latestStaleComment, + }; }); } function removeStaleBranches(octokit, params) { @@ -31738,10 +31750,7 @@ function removeStaleBranches(octokit, params) { const branchRegex = params.protectedBranchesRegex ? new RegExp(params.protectedBranchesRegex) : null; - const repo = { - repo: params.repo.repo, - owner: params.repo.owner, - }; + const repo = params.repo; const filters = { staleCutoff, authorsRegex,