A Gitea with MAX_RESPONSE_ITEMS below 50 returns short pages; taking
the first short page for the last one would have made the sync archive
every repository after it. Same for the label listing. A token renewal
skips git artifacts without credentials instead of failing, and the
guides say the source is readable through the API (no UI yet).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
A tenant's managed Gitea organisation becomes a git source: every
repository in it is a target, scanned on push, with findings as
labelled issues.
- Git source per tenant (`git_sources`, one doc): https base URL whose
host must match GIT_SOURCE_HOST_PATTERN, org, bot token and webhook
secret sealed like other credentials. Platform API
PUT/GET/DELETE /api/v1/platform/tenants/{id}/git-source; the secret
is returned only when issued (first PUT or rotate_webhook_secret).
Read-only GET /api/v1/git-source for IT admins and support.
- POST /webhook/{tenant_id}/gitea-source on the webhook server,
X-Gitea-Signature checked before anything is created. repository
created -> target (clone URL built from the source origin, bot token,
Gitea tracker, type from detection) and first scan unless empty;
deleted -> target archived; push to the default branch -> scan,
creating the target if missing. Other orgs are ignored. Entitlement
and ladder are checked as for scheduled work; usage events as usual.
- Targets get source_repo (unique per instance + repo id, so racing
deliveries make one target) and archived_at; the scheduler skips
archived targets.
- Sync job every GIT_SOURCE_SYNC_MINUTES (default 30): lists the org's
repos (paginated), creates missing, refreshes renamed, archives gone.
- Managed repos get the labels pruefwerk, cra:annex-i and
severity:* ensured once per run and attached by id; issue bodies name
the CRA requirement(s) and link into Prüfwerk. User-configured
trackers behave as before.
- Docs (DE/EN): connecting Managed Git and the bot's minimal rights.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB