mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 03:18:54 +08:00
chore: bump pinned Bun to 1.3.14 (#1312)
* chore: bump pinned Bun to 1.3.14 * style: apply prettier to actor/permissions files
This commit is contained in:
@@ -60,9 +60,7 @@ export async function checkHumanActor(
|
||||
(error.message.includes("Not Found") ||
|
||||
error.message.includes("is not a user"))
|
||||
) {
|
||||
const botName = githubContext.actor
|
||||
.toLowerCase()
|
||||
.replace(/\[bot\]$/, "");
|
||||
const botName = githubContext.actor.toLowerCase().replace(/\[bot\]$/, "");
|
||||
throw new Error(
|
||||
`Workflow initiated by non-human actor: ${botName} (actor not found on GitHub). Add bot to allowed_bots list or use '*' to allow all bots.`,
|
||||
);
|
||||
|
||||
@@ -102,10 +102,7 @@ export async function checkWritePermissions(
|
||||
// Handle 404 errors for non-user actors (e.g. GitHub Apps like Copilot
|
||||
// whose GITHUB_ACTOR doesn't end with [bot]).
|
||||
// The collaborator permission API only works for user accounts.
|
||||
if (
|
||||
error instanceof Error &&
|
||||
error.message.includes("is not a user")
|
||||
) {
|
||||
if (error instanceof Error && error.message.includes("is not a user")) {
|
||||
core.info(
|
||||
`Actor ${actor} is not a GitHub user (likely a GitHub App). Checking allowed_bots...`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user