| | @@ -16,7 +16,7 @@ problem twice as interesting, so not in the first pass. |
| 16 | 16 | |
| 17 | 17 | ### Steps |
| 18 | 18 | |
| 19 | | −- [ ] Domain: `RepoId`, `RepoName`, `Visibility` (Public/Private), `Repository` |
| 19 | +- [x] Domain: `RepoId`, `RepoName`, `Visibility` (Public/Private), `Repository` |
| 20 | 20 | - [ ] Domain: `RepoRepository` port — `find_by_id`, `find_by_org_and_name`, |
| 21 | 21 | `list_by_org`, `save` |
| 22 | 22 | - [ ] Infrastructure: in-memory + SQLite implementations, migration |
| | @@ -36,19 +36,17 @@ The owner creates a repo through the UI, a bare repo appears at |
| 36 | 36 | invisible to a signed-out visitor. `git clone` does **not** work yet — that is |
| 37 | 37 | milestone 4. |
| 38 | 38 | |
| 39 | | −### Decide during |
| 40 | | − |
| 41 | | −- **Repo name rules.** `OrgName` allows `[a-z0-9-]` and lowercases. Repo names |
| 42 | | − conventionally allow dots and underscores (`.github`, `my_repo`, `foo.js`) and are |
| 43 | | − often case-preserving. Following `OrgName` exactly is simplest and rejects names |
| 44 | | − people will reasonably want; allowing more means deciding about case-insensitive |
| 45 | | − uniqueness and about names that are awkward on disk. |
| 46 | | −- **`new` collides.** `/{handle}/repos/new` is a static route and static beats |
| 47 | | − parameterised, so a repo actually named `new` would be unreachable at its own URL. |
| 48 | | − Same problem as handles, same fix: a small reserved list on `RepoName`. Reserve |
| 49 | | − before the first repo exists. |
| 50 | | −- **Visibility default.** Public matches a portfolio-first product; private matches |
| 51 | | − every forge people are used to. |
| 39 | +### Settled |
| 40 | + |
| 41 | +- **Repo name rules:** `OrgName`'s, plus `.` and `_` for names like `.github` and |
| 42 | + `foo.js`. Lowercased, max 100. Also rejects a name of nothing but dots and any name |
| 43 | + ending `.git` — the first is traversal, the second would live at `foo.git.git`. |
| 44 | +- **Reserved repo names:** `import`, `new`, `search`. Only names directly under |
| 45 | + `/{handle}/repos/` can collide. |
| 46 | +- **Visibility defaults to public**, matching a portfolio-first product. |
| 47 | +- **Repositories carry an optional description**, capped at 300 characters — a sentence |
| 48 | + for the profile listing, not a README. *Added without being asked for; remove if it |
| 49 | + is not wanted.* |
| 52 | 50 | |
| 53 | 51 | ### Watch for |
| 54 | 52 | |