Description
Admin endpoints treat repoFullName as case-sensitive even though GitHub repository identity is case-insensitive.
registerRepo currently does an exact-case update match:
await this.repoRepo.update({ repoFullName }, { registered: true });
If the stored row casing differs from the request casing, registration can fail with "Repo not found" even for the same real GitHub repository. The same mismatch can also break downstream flows that rely on exact repoFullName lookup (for example token resolution/backfill paths).
Steps to Reproduce
- Ensure the
repos table has a row like entrius/das-github-mirror.
- Call
POST /api/v1/admin/repos/register with:
repoFullName: "Entrius/das-github-mirror" (different case).
- Observe registration fails because exact-case row match is not found.
Expected Behavior
Admin repo matching should be case-insensitive (or inputs normalized consistently), so equivalent casing variants of the same repo resolve to the same row.
Actual Behavior
Exact-case matching is used, causing valid repos to fail registration/backfill when request casing differs from stored casing.
Environment
- OS: Any
- Runtime/Node version: Node 20
- Browser (if applicable): N/A
Additional Context
Relevant paths:
packages/das/src/api/admin.controller.ts
packages/das/src/webhook/github-fetcher.service.ts
Potential fix direction:
- normalize incoming
repoFullName (e.g. lowercase) before persistence/lookups, and/or
- use case-insensitive DB predicates (
LOWER(repo_full_name) = LOWER($1)) for admin lookup/update paths.
Description
Admin endpoints treat
repoFullNameas case-sensitive even though GitHub repository identity is case-insensitive.registerRepocurrently does an exact-case update match:If the stored row casing differs from the request casing, registration can fail with "Repo not found" even for the same real GitHub repository. The same mismatch can also break downstream flows that rely on exact
repoFullNamelookup (for example token resolution/backfill paths).Steps to Reproduce
repostable has a row likeentrius/das-github-mirror.POST /api/v1/admin/repos/registerwith:repoFullName: "Entrius/das-github-mirror"(different case).Expected Behavior
Admin repo matching should be case-insensitive (or inputs normalized consistently), so equivalent casing variants of the same repo resolve to the same row.
Actual Behavior
Exact-case matching is used, causing valid repos to fail registration/backfill when request casing differs from stored casing.
Environment
Additional Context
Relevant paths:
packages/das/src/api/admin.controller.tspackages/das/src/webhook/github-fetcher.service.tsPotential fix direction:
repoFullName(e.g. lowercase) before persistence/lookups, and/orLOWER(repo_full_name) = LOWER($1)) for admin lookup/update paths.