Files
Gitea-Claude-Webhook-Proxy/.env.example
Dasemu 7e0ab6fdf3 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>
2026-08-24 03:30:47 +02:00

29 lines
1.1 KiB
Plaintext

# Port the proxy listens on (nginx will proxy_pass to this)
PORT=3000
# Exact value Gitea must send in the "Authorization" header.
# Configure the same value in Gitea (Settings -> Webhooks -> Authorization header).
GITEA_AUTH_HEADER=changeme-secret-A
# Secret configured on the Gitea webhook, used to verify the
# HMAC-SHA256 signature in the "X-Gitea-Signature" header.
GITEA_WEBHOOK_SECRET=changeme-gitea-secret
# Claude Code routine ID (the {ROUTINE_ID} part of /routines/{ROUTINE_ID}/fire)
ROUTINE_ID=trig_xxxxxxxxxxxxxxxxxxxxxxxx
# Routine token (sk-ant-oat01-...), sent as "Authorization: Bearer <token>"
ROUTINE_TOKEN=sk-ant-oat01-changeme
# TTL in milliseconds for the in-memory dedup of Gitea deliveries (X-Gitea-Delivery)
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