RepoLens's GitLab push mirror (2026-11-27) was created public, which exposed the private source and LICENSE's internal note; it is private now. The guide says so, with the lesson for other private repos: check the mirror's visibility right after creating it. It also records the report token (Guest role drops labels, expires 2027-11-26), the live system webhook and how its first deliveries were checked (no Test Delivery for system hooks), and which maintainer steps remain. The tracker marks the mirror. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9.7 KiB
RepoLens — migration guide
Written 2026-11-23 against
main@ed91e72(local cloneE:\repo, Giteapoli0981/repolens). Profile: SvelteKit 3 on one Cloudflare Worker (repolens.poli0981.dev), a showcase of the maintainer's repositories read from the GitHub API, with a Cron Trigger (*/10 * * * *) that warms the cache. Maintenance mode since v1.5.0. Shared decisions: README.
Done 2026-11-26. The migration merged as Gitea #2 (fast-forward to 35b5926, 9 commits: CI, Renovate, RL1–RL4,
templates, docs), the CI deploy job put it live (version 475c73d8, custom domain and the */10 cron applied),
and v1.6.0 followed with the dependency refresh (Gitea #3, #4). The site reads Gitea again: 24 public repos, the
production smoke 7/7. Renovate's onboarding PR #1 was closed (#2 adds renovate.json). What the move found:
- The repository went private on Gitea (the owner's choice:
LICENSEcarries an internal relicensing note that must not be public). Outside contributions arrive by e-mail. Renovate and the runner keep working (renovate-botis a collaborator). Its GitLab push mirror (added 2026-11-27, also where the confidential bug reports land) was created public, which exposed the private source and that note; it was switched to private the same day. For a private Gitea repo, check the mirror's visibility right after creating it. - Anonymous reads (D13) settled the VERIFY items:
GET /repos/{o}/{r}/licensesanswers (the list and repo objects carrylicensestoo, which can includeREADME);GET …/actions/runsanswers 401 without a token, so the build badge reads the head commit's statuses (GET …/commits/{sha}/status, anonymous, one per job, latest per context,target_urlrelative).GET …/actions/tasksis anonymous as well. - No ETag, no rate-limit headers (
Cache-Control: max-age=0, privateon every answer). RepoLens keeps each sub-resource with a validator instead: the repo'supdated_at(any push moves it, Renovate's branches included) or the head sha. A quiet list refresh is one request; a cold one 1 + 4 per repo. - No
pushed_at: the default branch's head commit time is the last push. Times carry the committer's offset (+07:00): normalise to UTC before comparing ISO strings. Stars and forks are always 0 without registration (hidden), and there are no deployments or language colours. - Webhook (RL3): Gitea signs with
X-Gitea-Signature(hex HMAC-SHA256, no prefix) and also sends GitHub-style headers (read fromservices/webhook/deliver.go). The system webhook form (Site Administration → Integrations → Webhooks → System Webhooks) names the events Create, Delete, Push, Repository, Release, Statuses and Workflow Run. Gitea sends no ping, rename, transfer or visibility events. - Bug reports (RL2, D14):
GITLAB_TOKEN_ISSUESis optional on purpose: without it the endpoint answers 503 and the dialog offerscode@(no deploy waits on a GitLab token). The token set on 2026-11-26 has the Guest role: GitLab files a Guest's confidential issue but silently drops its labels, so Reporter is the role to pick. It expires 2027-11-26 (RepoLens docs/11 §H). - System webhook (live 2026-11-27, admin hook #1): system hooks have no Test Delivery button, so the first real
events checked it (
npx wrangler tail repolens --format json --search webhook): a push and two commit statuses of free-games-itchio-list answered202, refreshed the list and the detail in ~2.5 s with 13 requests, and the burst's later deliveries rode along. - e2e in the job container: binding
wrangler devand Playwright to127.0.0.1(runbook §6) was enough; chromium and webkit both ran. One PR's CI took ~10 minutes on the single runner (verify 55 s, e2e 2 min 44 s, Qodana 2 min 48 s). - Merging in the UI: "Fast-forward only" keeps the signed commits; a UI merge commit is unsigned. Until #2 merged,
main's GitHub-eramaintenance-triage.ymlstill ran on the PR (pull_request_targetreads the base branch). - Branch protection (D6): no push, no force push; required
CI / verify (*),CI / e2e (*),Security / npm-audit (*),Reusable / Security / Secrets (gitleaks) (*),Reusable / Security / Dependencies (osv-scanner) (*). - adapter-cloudflare 9 builds through
@cloudflare/vite-pluginand refuses amaininwrangler.jsonc: RepoLens'swithScheduledcron entry needs a redesign before it can move (left on 8.0.3). Other SvelteKit Workers with a Cron Trigger will meet the same wall. - On the PC: GPG signing failed with "sending fd … to keyboxd" until
gpgconf --kill keyboxdof Gpg4win (git'sgpg.program), not Git Bash'sgpgconf. - Done by the maintainer by 2026-11-27: the GitLab project +
GITLAB_TOKEN_ISSUES, the system webhook +GITEA_WEBHOOK_SECRET, the deadGITHUB_*Worker secrets deleted. Still open: disconnecting Workers Builds, Qodana Cloud's VCS URL, and every repo's description/website/topics on Gitea (all empty after the import; RepoLens shows them once set).
Before the move: the site had no data source. Every repo it showed came from GitHub's GraphQL API with GITHUB_TOKEN_READ, a token of the suspended account; bug reports opened GitHub issues with GITHUB_TOKEN_ISSUES; the webhook was GitHub's. Restoring it is a website incident, which maintenance mode takes.
Decided (2026-11-23)
-
RL1 — the data source moves to the Gitea REST API, without a token (D13).
src/lib/server/github.tskeeps its normalised shapes and changes what fills them:Today (GraphQL / REST on github.com) Gitea repository list GET /users/poli0981/repos(paged,limit≤ 50)stars, forks, homepage, pushed, open issues and PRs, default branch, visibility GET /repos/{owner}/{repo}(stars_count,forks_count,website,updated_at,open_issues_count,open_pr_counter,default_branch,private)topics, languages /topics,/languagescommits, tags, releases /commits?sha=<default>&limit=…,/tags,/releaseslicence /licenses(VERIFY on 28.4.0), else theLICENSEfile's first linethe newest push's Actions runs /actions/runs(VERIFY, READMEghtable)deployments none on Gitea: the deploy line goes Stars and forks read 0 on an instance without registration: hide the two counters rather than show zeros. Fixtures in
tests/fixtures/gh/are replaced with recorded Gitea answers; the unit tests keep fakingghFetch(rename it if the session likes).src/params.ts' guard against odd repo names stays. The cache, the warm cron and the rate limits stay as they are; Gitea has no GraphQL points, so docs/05's points budget becomes a request budget. -
RL2 — bug reports go to GitLab (D14).
src/lib/server/issues.tscreates the issue ongitlab.com/poli0981/repolens(preview hosts stay a dry run).GITHUB_TOKEN_ISSUES→GITLAB_TOKEN_ISSUES. -
RL3 — the webhook. Gitea sends
X-Gitea-EventandX-Gitea-Signature(hex HMAC-SHA256 of the body, VERIFY on 28.4.0). One system webhook (Site Administration → Webhooks) covers every repo instead of one per repo;webhook.tsverifies the new header and maps Gitea'spush/release/repositoryevents onto the same eviction plans.GITHUB_WEBHOOK_SECRET→GITEA_WEBHOOK_SECRET(still opt-in, still outsidesecrets.required). -
RL4 — legal. The privacy text changes where report data goes (GitLab instead of GitHub) and where repo data comes from: a material change. Edit
legal/*.mdin ONE commit, runnpm run build:legal, bumpLEGAL_VERSION. -
Order: the CI move first, then RL1–RL4 as their own commits on the same branch; the first deploy (D3) ships them together.
-
D2 (
maintenance-triage.ymlgoes), D3 (deploy job withwrangler deploy: Cron Triggers apply only onwrangler deploy, never onversions upload), D6 (.github/rulesets/main.jsongoes; branch protection names the new check names), D7.
Workflows (.github/workflows → .gitea/workflows)
| File | Do |
|---|---|
ci.yml (verify, Sonar, e2e with a GitHub read token, upstream artifact actions) |
Move; Gitea artifact actions; remove Sonar (D1); the e2e run needs no GitHub token after RL1. Add the deploy job on main (D3) |
e2e.yml (production smoke, 0 4 * * *) |
Move; cron → 11 13 * * * |
security.yml (osv-scanner, npm-audit, gitleaks, Snyk; 0 6 * * 1) |
osv-scanner and gitleaks → the ops security.yml caller (node: true), cron 33 14 * * 2; npm-audit and Snyk stay local, Snyk pinned by SHA |
qodana.yml |
Caller of reusable-qodana.yml (package-manager: npm) |
codeql.yml (dispatch-only caller of reusable-codeql.yml@main) |
Delete |
dependabot-automerge.yml |
Delete: Renovate's automerge rules live in renovate-config |
maintenance-triage.yml |
Delete (D2) |
.github/dependabot.yml → delete; add renovate.json (the typescript 6 / @typescript/native 7 pair stays manual, as CLAUDE.md says).
Links and docs
README.md (8), MAINTAINERS.md, CONTRIBUTING.md, ACCESSIBILITY.md (+ legal/ACCESSIBILITY.md), legal/THIRD_PARTY_NOTICES.md, src/lib/legal/content.ts (generated: edit legal/*.md), .github/ISSUE_TEMPLATE/config.yml, docs/02, 05, 10 and 11, .dev.vars.example, wrangler.jsonc (secrets.required), CLAUDE.md (data source, landmines, deploys), and the UI copy that says "GitHub" (EN and VI). CHANGELOG.md is history.
Secrets
Actions: keep QODANA_TOKEN, SNYK_TOKEN. Create (user level): CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID. Drop SONAR_TOKEN and the explicit GITHUB_TOKEN. Worker: remove GITHUB_TOKEN_READ; GITHUB_TOKEN_ISSUES → GITLAB_TOKEN_ISSUES (D14); GITHUB_WEBHOOK_SECRET → GITEA_WEBHOOK_SECRET.