Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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

server/web/templates/requests.html +3−3

@@ -40,7 +40,7 @@
40 40 <td class="fit"><span class="state {{.State}}">{{.State}}</span></td>
41 41 <td>
42 42 <a class="row-title" href="/r/{{$.Name}}/requests/{{.ID}}">{{.Title}}</a>
43 <div class="row-meta"><span class="sha">#{{short .ID}}</span><span>{{len .Comments}} comment(s)</span></div>
43 <div class="row-meta"><span class="sha">{{num .Number}}</span><span>{{len .Comments}} comment(s)</span></div>
44 44 </td>
45 45 <td><code>{{.Base}}</code> <span class="muted">←</span> {{if .HeadRef}}<code title="the branch this request follows">{{.HeadRef}}</code> {{end}}<span class="sha">{{short .Head}}</span></td>
46 46 <td class="muted nowrap">{{who .Author}}</td>
@@ -86,7 +86,7 @@
86 86 {{end}}{{end}}
87 87 {{if .Request.Closes}}
88 88 <p class="muted">Closes
89 {{range $i, $id := .Request.Closes}}{{if $i}}, {{end}}<a href="/r/{{$.Name}}/issues/{{$id}}">#{{short $id}}</a>{{end}}
89 {{range $i, $id := .Request.Closes}}{{if $i}}, {{end}}<a href="/r/{{$.Name}}/issues/{{$id}}">{{num (index $.Numbers $id)}}</a>{{end}}
90 90 when merged.</p>
91 91 {{end}}
92 92 {{if .FileCount}}
@@ -197,7 +197,7 @@
197 197 <h1>{{.Request.Title}}</h1>
198 198 <p class="page-sub">
199 199 <span class="state {{.Request.State}}">{{.Request.State}}</span>
200 · <span class="sha">#{{short .Request.ID}}</span>
200 · <span class="sha">{{num .Number}}</span>
201 201 · by {{who .Request.Author}} {{since .Request.Created.Unix}}
202 202 {{if eq .Request.State "merged"}}
203 203 · merged into <code>{{.Request.Base}}</code> at <span class="sha">{{short .Request.MergedHead}}</span>