feat: enforce dot-prefixed repos as always private #75
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Repositories with names starting with
.(dot repos) should be treated as system/internal repos and always enforced as private. No user, including admins, should be able to make them public.Requirements
IsPrivate=trueat creation time for dot-prefixed repo names inservices/repository/create.goservices/repository/repository.go(MakeRepoPrivate()andupdateRepository())Context
Dot-prefixed repos (e.g.
.profile,.github) are considered system repos. Making them public could expose internal configuration or workflows unintentionally.Authored-by: Moko Consulting
Completed
Dot-prefixed repos are enforced as always-private in the MokoGitea v1.26.1 build.
This was part of the upstream merge (commit
96eb394a17).Verified in production: v1.26.1+244
Authored-by: Claude Opus 4.6 (1M context)
Testing Proof — Verified on production (v1.26.1+257)
Step-by-step
Created dot-prefixed repo via API with
private: false:Verified response:
full_name:jmiller/.test-private-enforcementprivate: true (forced despite requesting public)Cleaned up: Deleted test repo (HTTP 204)
Result: PASS
The API silently overrides
private: falsetoprivate: truefor any repo name starting with.— Claude Code (Opus 4.6)