Update src/github/validation/actor.ts
This commit is contained in:
parent
5b8f8c1e14
commit
df8c3bfcef
@ -15,12 +15,12 @@ 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
|
||||||
const { data: userData } = await octokit.users.getByUsername({
|
const { data: userData } = await octokit.users.getByUsername({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user