You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Admin validateRepoFullName lowercases — not webhook path
No open/closed issue
findOneBy({ repoFullName }) false-negative skip when casing differs
Description
Before handling repo-scoped webhooks, WebhookService checks registration with an exact-case primary-key lookup on payload.repository.full_name. GitHub repository names are case-insensitive. Rows created by installation_repositories.added store repo.full_name as sent by GitHub (often mixed case). Admin registration updates via LOWER(repo_full_name) but does not rename the PK. If the webhook payload casing does not exactly match the stored repos.repo_full_name, findOneBy returns null and the handler logs “not registered” and drops the event—even when a registered row exists under another casing variant.
This is the inverse failure mode of #120 (ingestion continues); here ingestion stops incorrectly.
Duplicate check
webhook.servicegatevalidateRepoFullNamelowercases — not webhook pathfindOneBy({ repoFullName })false-negative skip when casing differsDescription
Before handling repo-scoped webhooks,
WebhookServicechecks registration with an exact-case primary-key lookup onpayload.repository.full_name. GitHub repository names are case-insensitive. Rows created byinstallation_repositories.addedstorerepo.full_nameas sent by GitHub (often mixed case). Admin registration updates viaLOWER(repo_full_name)but does not rename the PK. If the webhook payload casing does not exactly match the storedrepos.repo_full_name,findOneByreturns null and the handler logs “not registered” and drops the event—even when a registered row exists under another casing variant.This is the inverse failure mode of #120 (ingestion continues); here ingestion stops incorrectly.
Steps to Reproduce
installation_repositories.addedcreatesreposrowOrg/MyRepo(registered=false).POST /api/v1/admin/repos/registerwithorg/myrepo—LOWERmatch setsregistered=trueon the existing PKOrg/MyRepo(or creates a second row if both exist — see Critical] Silent uninstall failure — data ingestion continues after app removal due to case-sensitive PK match #120).pull_requestwebhook withrepository.full_name=org/myrepo.webhook.service.tsrunsrepoRepo.findOneBy({ repoFullName: 'org/myrepo' })→ no match.Expected Behavior
Registration gate should resolve repos case-insensitively (e.g.
LOWER(repo_full_name) = LOWER($1)), consistent with admin register,getTokenForRepo, and miner queries.Actual Behavior
Environment
Additional Context
Related: Normalize
repo_full_nameto lowercase on all insert paths (#121) plus case-insensitive lookup inWebhookServicefor legacy rows.PR scope: ~15–40 lines.