Only fire the routine when an issue/PR is assigned to Claude
Gitea's X-Gitea-Event only gives the coarse event; the precise "assigned" sub-event lives in X-Gitea-Event-Type (issue_assign, pull_request_assign). Read that header and check the assignees list against CLAUDE_GITEA_USERNAME so unrelated assignment changes get a 200 "ignored" instead of triggering a routine fire. Document the known Gitea limitation where it can't tell us who was just added to assignees, only the full current list. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,3 +21,8 @@ DEDUP_TTL_MS=300000
|
||||
# Timeout in milliseconds for the call to the Anthropic API (prevents it from
|
||||
# hanging indefinitely if there's no outbound internet access)
|
||||
FIRE_TIMEOUT_MS=10000
|
||||
|
||||
# Gitea username to match against issue/PR assignees for "issue_assign" and
|
||||
# "pull_request_assign" events. Only deliveries assigning this user forward
|
||||
# a routine fire; other assignment changes are ignored (200 "ignored").
|
||||
CLAUDE_GITEA_USERNAME=claude
|
||||
|
||||
Reference in New Issue
Block a user