From 778b445af2f35523d99c5296fc2305c1a8846cc8 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 19 Oct 2024 16:42:18 -0700 Subject: [PATCH] main: don't send slack message if the actor starts with # --- actions/main/action.cjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/actions/main/action.cjs b/actions/main/action.cjs index ff997dfa..63a66ea2 100644 --- a/actions/main/action.cjs +++ b/actions/main/action.cjs @@ -226,6 +226,12 @@ module.exports = async ({ github, context, inputs, actionPath, core, debug = fal const actor = githubToSlack[lowerActor] ? githubToSlack[lowerActor] : `@${context.actor}` core.setSecret(actor) + // if actor starts with hashtag, return eagerly + if (actor.startsWith('#')) { + debugLog('Actor starts with hashtag, exiting eagerly!') + return + } + if (fs.existsSync('reviewdog.fail.log')) { // print reviewdog.fail.log to the console const log = fs.readFileSync('reviewdog.fail.log', 'UTF-8').replaceAll(/^/g, CONSOLE_BLUE)