mirror of
https://github.com/Dasemu/Gitea-Claude-Webhook-Proxy.git
synced 2026-11-26 15:26:07 +00:00
Add root CLAUDE.md, LESSONS.md, docs/deployment.md, .claude/settings.json hooks (syntax-check on edit and on stop), and CI workflows (lint/test, version bump) per the repo bootstrap standard. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
CLAUDE.md
Overview
Node.js/Express proxy that receives Gitea webhooks and forwards them to the
Claude Code Routines API, adding headers Gitea can't send itself. See
README.md for the request flow and docs/ for deployment details.
Commands
- Dev:
npm install && cp .env.example .env(fill in real values), thennode server.js - Test: none configured yet
- Lint: none configured yet
- Build: none (plain Node.js, no build step)
- Syntax check:
node --check server.js
Architecture
Single-file Express server (server.js) exposing POST /gitea-webhook and
GET /health. No database, no persistent state beyond an in-memory dedup
cache. See docs/ for deployment (currently Docker-only; see Gotchas).
Conventions
- CommonJS (
require/module.exports), no TypeScript, no build step. - Keep the whole proxy in
server.jsunless it grows enough to justify splitting.
Workflow quirks
- No test suite or linter exists yet; CI only runs the syntax check.
Deployment
- Current: Docker image built from the repo
Dockerfile, meant to run behind an existing nginx reverse proxy doingproxy_passto127.0.0.1:3000. - The project's deployment standard (see
docs/deployment.md) expects a systemd unit, an idempotentscripts/update.sh, and an authenticated update-trigger endpoint. None of these exist yet in this repo.
Gotchas
- Gitea's
X-Gitea-Event-Typesub-event is needed to detectissue_assign/pull_request_assign; the coarseX-Gitea-Eventheader isn't enough (see README's "Known limitation" note on assignee diffing). .envis never committed;.env.examplelists variable names only.