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/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.

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/request_view.go +9−2

@@ -71,8 +71,13 @@ type requestCI struct {
71 71 // refresh the whole sidebar without rebuilding the rest of the review.
72 72 type requestSidebarView struct {
73 73 Page
74 Name string
75 Request *metadata.Request
74 Name string
75 Request *metadata.Request
76 // Number is the `#42` alias, derived from creation order in history.
77 Number int
78 // Numbers is every alias in the repo, so the `closes` links and the thread can
79 // name issues they were not given directly.
80 Numbers map[string]int
76 81 Approvals []requestApproval
77 82 Checks []requestCheck
78 83 Required int
@@ -201,8 +206,10 @@ func (w *Web) requestSidebar(r *http.Request, m *repo.Meta, req *metadata.Reques
201 206 }
202 207 }
203 208 }
209 nums := w.entityNumbers(m)
204 210 return requestSidebarView{
205 211 Page: w.page(r, title), Name: m.Name, Request: req,
212 Number: nums[req.ID], Numbers: nums,
206 213 Approvals: approvals, Checks: checks, Required: required, Current: current,
207 214 CanApprove: approvable, CanClose: canClose, HeadRefNote: headRefNote,
208 215 CanRetarget: canRetarget, BaseOptions: baseOptions, HeadOptions: headOptions,