fix(prd-1): handle undefined actor type on Forgejo
Forgejo's user API doesn't return a `type` field (GitHub returns "User" or "Bot"). The undefined type was incorrectly treated as non-human, blocking all Forgejo workflows. Now treat undefined/empty type as human — Forgejo doesn't have GitHub-style bot accounts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
e26d08e666
commit
638645b8af
2 files changed
+21
-2
No files matched your search
@@ -21,8 +21,10 @@ export async function checkHumanActor(
|
||||
|
||||
console.log(`Actor type: ${actorType}`);
|
||||
|
||||
// Check bot permissions if actor is not a User
|
||||
if (actorType !== "User") {
|
||||
// On Forgejo, the user API doesn't return a `type` field (undefined).
|
||||
// Treat undefined/empty type as a human user — Forgejo doesn't have
|
||||
// GitHub-style bot/app accounts.
|
||||
if (actorType && actorType !== "User") {
|
||||
const allowedBots = githubContext.inputs.allowedBots;
|
||||
|
||||
// Check if all bots are allowed
|
||||
|
||||
Reference in new issue
Block a user