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
cmd/vole/flags_test.go +10−2
| @@ -223,11 +223,19 @@ func TestRepeatedMessagesBecomeParagraphs(t *testing.T) { | |||
| 223 | 223 | ||
| 224 | 224 | func TestFormatIssue(t *testing.T) { | |
| 225 | 225 | iss := issueForTest() | |
| 226 | out := formatIssue("%(shortid) %(state) %(labels) %(title)", iss) | ||
| 227 | want := "01M5JR2J open bug,ui A title" | ||
| 226 | // The numbering is derived from history, so the formatting test supplies it the | ||
| 227 | // same way the command does. | ||
| 228 | nums := metadata.RankAdditions([][]string{{"issues/" + iss.ID + "/issue.md"}}) | ||
| 229 | out := formatIssue("%(number) %(shortid) %(state) %(labels) %(title)", iss, nums) | ||
| 230 | want := "#1 01M5JR2J open bug,ui A title" | ||
| 228 | 231 | if out != want { | |
| 229 | 232 | t.Fatalf("format = %q, want %q", out, want) | |
| 230 | 233 | } | |
| 234 | // A branch with no numbering must say so rather than print a number nobody | ||
| 235 | // assigned. | ||
| 236 | if out := formatIssue("%(number)", iss, nil); out != "#?" { | ||
| 237 | t.Fatalf("unnumbered format = %q, want %q", out, "#?") | ||
| 238 | } | ||
| 231 | 239 | } | |
| 232 | 240 | ||
| 233 | 241 | // TestFlagsBelongToTheSubcommand: options are parsed per group, but a flag that | |