vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Number issues and change requests for human references
e05f1c48d4ee55635cd7b77889f0545137198106 · Keenan Nemetz · 13d ago · parent 41d1fee9
Number issues and change requests for human references A ULID is an unreadable handle, and the 8-character prefix the list showed is mostly timestamp: this repository's 27 issues shared seven distinct six-character prefixes and two pairs already collided at eight. The part people actually type carried almost no information. Issues and change requests now share one gap-free sequence (#1, #42, ...) derived from the creation order in the metadata branch's history, the way one forge counts both in a single run. The number is not stored. It is the rank of the entity's creation commit, so nothing is written when an entity is created, a repository needs no backfill, the same history gives the same numbers on every clone, and `vole admin index rebuild` reproduces them from git. A ULID stays the identity: paths, front matter, `closes:` and audit entries are unchanged, and data/index.db only caches the mapping so a page render does not walk history. Every id-taking command accepts a number, `#42` links in a body through a kind-agnostic /r/<repo>/n/42 route, and --closes resolves an alias to the ULID before writing. Closes #45
metadata/request_find.go +19−2
| @@ -8,9 +8,26 @@ import ( | |||
| 8 | 8 | ) | |
| 9 | 9 | ||
| 10 | 10 | // Find returns one request by id. A unique prefix is accepted, because the list | |
| 11 | // command prints full ids but people type the part they read. | ||
| 11 | // command prints full ids but people type the part they read. A bare number is | ||
| 12 | // the alias `#42` names, shared with issues, so the kind is checked rather than | ||
| 13 | // assumed: asking for a change request by an issue's number is a mistake worth | ||
| 14 | // naming. | ||
| 12 | 15 | func FindRequest(g *git.Repo, id string) (*Request, error) { | |
| 13 | id = strings.TrimSpace(id) | ||
| 16 | id = TrimReference(id) | ||
| 17 | if num, ok := ParseNumber(id); ok { | ||
| 18 | nums, err := LoadNumbers(g, Ref) | ||
| 19 | if err != nil { | ||
| 20 | return nil, err | ||
| 21 | } | ||
| 22 | found, kind, ok := nums.At(num) | ||
| 23 | if !ok { | ||
| 24 | return nil, fmt.Errorf("no change request or issue is #%d", num) | ||
| 25 | } | ||
| 26 | if kind != KindRequest { | ||
| 27 | return nil, fmt.Errorf("#%d is an issue, not a change request: %s", num, found) | ||
| 28 | } | ||
| 29 | id = found | ||
| 30 | } | ||
| 14 | 31 | list, err := LoadRequests(g, Ref) | |
| 15 | 32 | if err != nil { | |
| 16 | 33 | return nil, err | |