From deab8514c26a930157c256da6a164801385267ed Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 11 Aug 2023 09:16:14 -0400 Subject: [PATCH] Fix logging for removing nonexistent label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/jsoref/stale-bot-debug/actions/runs/5828506506/job/15806335430#step:2:97 ::group::[#2] Issue #2 [#2] Issue #2 ... [#2] Removing all the labels specified via the labels-to-remove-when-stale (​https://github.com/actions/stale#labels-to-remove-when-stale​) option. [#2] Removing the label "label-to-add-when-unstale" from this issue... Error: [#2] Error when removing the label: "Label does not exist" The quotes on this last line make it look like the action was trying to remove a label named `Label does not exist`. This change removes the quotes to make it clear that the text is just an error message (which is implied by the `:`) as opposed to the name of a label, which is the reading one gets from the inclusion of additional quotes around the text. --- dist/index.js | 2 +- src/classes/issues-processor.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 441592e2..ab1b84c3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -998,7 +998,7 @@ class IssuesProcessor { issueLogger.info(`${isSubStep ? logger_service_1.LoggerService.white('└── ') : ''}The label "${logger_service_1.LoggerService.cyan(label)}" was removed`); } catch (error) { - issueLogger.error(`${isSubStep ? logger_service_1.LoggerService.white('└── ') : ''}Error when removing the label: "${logger_service_1.LoggerService.cyan(error.message)}"`); + issueLogger.error(`${isSubStep ? logger_service_1.LoggerService.white('└── ') : ''}Error when removing the label: ${logger_service_1.LoggerService.cyan(error.message)}`); } }); } diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 71a0d003..8858b718 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -1039,7 +1039,7 @@ export class IssuesProcessor { issueLogger.error( `${ isSubStep ? LoggerService.white('└── ') : '' - }Error when removing the label: "${LoggerService.cyan(error.message)}"` + }Error when removing the label: ${LoggerService.cyan(error.message)}` ); } }