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.go +17
| @@ -12,6 +12,7 @@ import ( | |||
| 12 | 12 | "fmt" | |
| 13 | 13 | "net/http" | |
| 14 | 14 | "strconv" | |
| 15 | "strings" | ||
| 15 | 16 | ||
| 16 | 17 | "github.com/rodent-software/vole/forge/repo" | |
| 17 | 18 | "github.com/rodent-software/vole/metadata" | |
| @@ -42,6 +43,22 @@ func numberLabel(number int) string { | |||
| 42 | 43 | return "#" + strconv.Itoa(number) | |
| 43 | 44 | } | |
| 44 | 45 | ||
| 46 | // numberedTitle names a page from the part the reader asked for to the place it | ||
| 47 | // lives: the number and title first, then a section when the page is a tab of | ||
| 48 | // the item, then the repository. The chrome appends the instance name, so a | ||
| 49 | // browser tab or a bookmark reads most specific first. An empty section or | ||
| 50 | // repository is left out rather than rendered as a dangling separator. | ||
| 51 | func numberedTitle(number int, title, section, repo string) string { | ||
| 52 | parts := []string{numberLabel(number) + " " + title} | ||
| 53 | if section != "" { | ||
| 54 | parts = append(parts, section) | ||
| 55 | } | ||
| 56 | if repo != "" { | ||
| 57 | parts = append(parts, repo) | ||
| 58 | } | ||
| 59 | return strings.Join(parts, " · ") | ||
| 60 | } | ||
| 61 | |||
| 45 | 62 | // resolveCloses turns `42` and `#42` in a Closes field into the issue's ULID, the | |
| 46 | 63 | // form the file stores. A number that names a change request is refused: a request | |
| 47 | 64 | // cannot close a request, and the author is still looking at the form. | |