From fde7d4444eceb023223276fad71f7a5bf18b6feb Mon Sep 17 00:00:00 2001 From: John Sudol <24583161+johnsudol@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:42:47 +0000 Subject: [PATCH] update logging message for exempt labels --- README.md | 3 +-- dist/index.js | 5 +++-- src/classes/issues-processor.ts | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b35614e4..04f2bede 100644 --- a/README.md +++ b/README.md @@ -246,8 +246,7 @@ Required Permission: `pull-requests: write` #### exempt-issue-labels -The label(s) that can exempt to automatically mark as stale the issues. -It can be a comma separated list of labels (e.g: `question,bug`). +A comma separated list of labels, that prevent the issue from being marked as stale. (e.g: `question,bug,wip`) If unset (or an empty string), this option will not alter the stale workflow. diff --git a/dist/index.js b/dist/index.js index 7002e0c7..2458372d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -526,14 +526,15 @@ class IssuesProcessor { issueLogger.info(`This $$type has a stale label`); } else { - issueLogger.info(`This $$type hasn't a stale label`); + issueLogger.info(`This $$type doesn't have a stale label`); } const exemptLabels = words_to_list_1.wordsToList(issue.isPullRequest ? this.options.exemptPrLabels : this.options.exemptIssueLabels); if (exemptLabels.some((exemptLabel) => is_labeled_1.isLabeled(issue, exemptLabel))) { if (issue.isStale) { - issueLogger.info(`An exempt label was added after the stale label.`); + // issueLogger.info(`An exempt label was added after the stale label.`); + issueLogger.info(`This $$type has an exempt label, removing the stale label.`); yield this._removeStaleLabel(issue, staleLabel); } issueLogger.info(`Skipping this $$type because it has an exempt label`); diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 48a770b9..a22b10c8 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -323,7 +323,7 @@ export class IssuesProcessor { if (issue.isStale) { issueLogger.info(`This $$type has a stale label`); } else { - issueLogger.info(`This $$type hasn't a stale label`); + issueLogger.info(`This $$type doesn't have a stale label`); } const exemptLabels: string[] = wordsToList( @@ -338,7 +338,10 @@ export class IssuesProcessor { ) ) { if (issue.isStale) { - issueLogger.info(`An exempt label was added after the stale label.`); + // issueLogger.info(`An exempt label was added after the stale label.`); + issueLogger.info( + `This $$type has an exempt label, removing the stale label.` + ); await this._removeStaleLabel(issue, staleLabel); }