- issue-label: Accept action "created" from Gitea (in addition to "labeled" and "label_updated") — Gitea sends "created" for new labels - pr-rework: Guard against missing review object to prevent TypeError crash when Gitea sends review webhook without review data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d19798dfea
commit
f495ea391f
@@ -24,7 +24,7 @@ export function issueLabel(config: Config, queue: TaskQueue) {
|
||||
|
||||
console.log(`[issue-label] action="${event.action}" issue=#${event.issue.number} labels=[${event.issue.labels.map((l) => l.name).join(", ")}]`);
|
||||
|
||||
if (event.action !== "label_updated" && event.action !== "labeled") {
|
||||
if (!["labeled", "label_updated", "created"].includes(event.action)) {
|
||||
return c.text("ignored: not a label event", 200);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ export function prRework(config: Config, queue: TaskQueue) {
|
||||
return c.text("ignored: not a reviewed event", 200);
|
||||
}
|
||||
|
||||
if (!event.review) {
|
||||
return c.text("ignored: no review data", 200);
|
||||
}
|
||||
|
||||
const [org, repo] = event.repository.full_name.split("/");
|
||||
const prNumber = event.pull_request.number;
|
||||
const reviewState = event.review.state.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user