vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Lead an issue or change page with its number
de84c32b49652afb50e5b71d8bf842a4871ec7ec · Keenan Nemetz · 5d ago · parent eec0e603
Lead an issue or change page with its number The number alias sat in the subtitle while the heading showed the title alone, and the document title led with the repository, so a browser tab or a bookmark hid which item it was. Put the number before the title on both pages, and name the document from the item outwards: number and title, then the tab, then the repository.
server/web/numbers_test.go +31
| @@ -0,0 +1,31 @@ | |||
| 1 | package web | ||
| 2 | |||
| 3 | import "testing" | ||
| 4 | |||
| 5 | // TestNumberedTitle pins the order a document title reads in: the numbered item | ||
| 6 | // the reader asked for first, then the tab it belongs to, then the repository. | ||
| 7 | // The chrome appends the instance name, so the least specific part always comes | ||
| 8 | // last. A repository that did not number the entity keeps the `#?` label rather | ||
| 9 | // than silently dropping the number. | ||
| 10 | func TestNumberedTitle(t *testing.T) { | ||
| 11 | cases := []struct { | ||
| 12 | name string | ||
| 13 | number int | ||
| 14 | title, section string | ||
| 15 | repo string | ||
| 16 | want string | ||
| 17 | }{ | ||
| 18 | {name: "issue", number: 42, title: "Crash on start", repo: "vole", want: "#42 Crash on start · vole"}, | ||
| 19 | {name: "change tab", number: 7, title: "Tidy the parser", section: "changes", repo: "vole", | ||
| 20 | want: "#7 Tidy the parser · changes · vole"}, | ||
| 21 | {name: "unnumbered", number: 0, title: "No number", repo: "vole", want: "#? No number · vole"}, | ||
| 22 | } | ||
| 23 | for _, c := range cases { | ||
| 24 | t.Run(c.name, func(t *testing.T) { | ||
| 25 | if got := numberedTitle(c.number, c.title, c.section, c.repo); got != c.want { | ||
| 26 | t.Fatalf("numberedTitle(%d, %q, %q, %q) = %q, want %q", | ||
| 27 | c.number, c.title, c.section, c.repo, got, c.want) | ||
| 28 | } | ||
| 29 | }) | ||
| 30 | } | ||
| 31 | } | ||