fix: fall back to issue.assignee on Forgejo for assignee trigger
Forgejo's issues/assigned webhook payload doesn't include a top-level assignee object. The assignee is only available under issue.assignee. Fall back to that field when payload.assignee is missing. Also removes M5 debug logging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
001072c05c
commit
99624efacc
2 files changed
+5
-25
No files matched your search
@@ -187,30 +187,6 @@ async function run() {
|
||||
}
|
||||
}
|
||||
|
||||
// === M5 DEBUG START ===
|
||||
console.log(`[M5 DEBUG] eventName: ${context.eventName}`);
|
||||
console.log(`[M5 DEBUG] eventAction: ${context.eventAction}`);
|
||||
console.log(
|
||||
`[M5 DEBUG] assigneeTrigger: "${context.inputs?.assigneeTrigger}"`,
|
||||
);
|
||||
console.log(
|
||||
`[M5 DEBUG] ASSIGNEE_TRIGGER env: "${process.env.ASSIGNEE_TRIGGER}"`,
|
||||
);
|
||||
if (isEntityContext(context)) {
|
||||
const payload = context.payload as Record<string, any>;
|
||||
console.log(
|
||||
`[M5 DEBUG] payload.assignee: ${JSON.stringify(payload.assignee)}`,
|
||||
);
|
||||
console.log(
|
||||
`[M5 DEBUG] payload.issue.assignee: ${JSON.stringify(payload.issue?.assignee)}`,
|
||||
);
|
||||
console.log(
|
||||
`[M5 DEBUG] payload.issue.assignees: ${JSON.stringify(payload.issue?.assignees?.map((a: any) => a.login))}`,
|
||||
);
|
||||
console.log(`[M5 DEBUG] payload.action: ${payload.action}`);
|
||||
}
|
||||
// === M5 DEBUG END ===
|
||||
|
||||
// Check trigger conditions
|
||||
const containsTrigger =
|
||||
modeName === "tag"
|
||||
|
||||
Reference in new issue
Block a user