Update src/github/validation/actor.ts

This commit is contained in:
root 2025-12-27 12:37:36 +08:00
parent 5b8f8c1e14
commit df8c3bfcef

View File

@ -15,11 +15,11 @@ export async function checkHumanActor(
if (process.env.OVERRIDE_BOT_USERNAMES){ if (process.env.OVERRIDE_BOT_USERNAMES){
if (process.env.OVERRIDE_BOT_USERNAMES.split(",").includes(githubContext.actor)){ 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`, `Workflow initiated by non-human actor: ${githubContext.actor}. Please add bot to OVERRIDE_BOT_USERNAMES`,
); );
}
return;
} }
// Fetch user information from GitHub API // Fetch user information from GitHub API