diff --git a/src/github/validation/actor.ts b/src/github/validation/actor.ts index 8255da6..6b9da03 100644 --- a/src/github/validation/actor.ts +++ b/src/github/validation/actor.ts @@ -15,11 +15,11 @@ export async function checkHumanActor( if (process.env.OVERRIDE_BOT_USERNAMES){ if (process.env.OVERRIDE_BOT_USERNAMES.split(",").includes(githubContext.actor)){ - return; - } - throw new Error( + throw new Error( `Workflow initiated by non-human actor: ${githubContext.actor}. Please add bot to OVERRIDE_BOT_USERNAMES`, ); + } + return; } // Fetch user information from GitHub API