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.
Serve repositories from the root of the URL space
ed03b3d1fa16ef6b55e2773aaf10e3be13282c3a · Keenan Nemetz · 4h ago · parent d37d301f
Serve repositories from the root of the URL space A repository is now /<name> and its Git transport /<name>.git, so the URL a person opens, the URL a clone uses, and the Go module path are the same name. The forge's own pages moved under /-/ (admin, accounts, the directory, the feed, sign-in, assets), a prefix no repository name can start with: names are [a-z0-9...] and cannot begin with "-". That leaves the router with two disjoint spaces and removes the /r/ and /git/ prefixes, which existed only to keep repositories away from the forge's own paths. Routes: repoRoutes lose /r/; global, auth and admin routes gain /-/; assets move to /-/static/ because a subtree pattern like /static/ cannot coexist with one-segment-wildcard repo routes — Go's mux reports them as conflicting neither-more-specific patterns. The catch-all still renders the styled 404. Transport: githttp.Route parses /<name>.git/<rest> instead of a /git/ prefix, and forgepaths.go hands such requests to the proxy before the mux, because a wildcard fills a whole segment and cannot match "<name>.git". LFS stays on the mux (<name>.git/info/lfs/...), and the Go module discovery probe moves to the same pre-router so a package path under a public repository is answered even when its first segments name a page tab. Names: repo.ValidateName now refuses the four root paths the forge must keep — static, robots.txt, sitemap.xml, sitemap-pages.xml. Everything else is an ordinary repository name, including admin, u, and activity. Docs and the packaged URLs follow the new layout; robots.txt, the sitemaps and the instance activity feed point at the new paths. No aliases: the old /r/ and /git/ URLs are gone. Verified with ./vole workflow check and ./vole workflow run verify.
server/web/templates/run.html +10−10
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | {{if .Run.TriggerTitle}}· {{.Run.TriggerTitle}}{{end}} | |
| 10 | 10 | {{if ne .Run.JobTitle .Run.WorkflowTitle}}· {{.Run.WorkflowTitle}}{{end}} | |
| 11 | 11 | · {{if .Run.Tag}}tag {{.Run.Tag}}{{else}}{{.Run.Branch}}{{end}} | |
| 12 | at <a class="sha" href="/r/{{.Name}}/commit/{{.Run.SHA}}">{{short .Run.SHA}}</a> | ||
| 12 | at <a class="sha" href="/{{.Name}}/commit/{{.Run.SHA}}">{{short .Run.SHA}}</a> | ||
| 13 | 13 | · attempt {{.Run.Attempts}} | |
| 14 | 14 | </p> | |
| 15 | 15 | {{if .Run.JobDescription}}<p class="page-sub">{{.Run.JobDescription}}</p>{{end}} | |
| @@ -17,11 +17,11 @@ | |||
| 17 | 17 | </div> | |
| 18 | 18 | {{if or .CanCancel .CanRerun}} | |
| 19 | 19 | <div class="page-head-actions"> | |
| 20 | {{if .CanCancel}}<form class="inline" method="post" action="/r/{{.Name}}/runs/{{.Run.ID}}/cancel"> | ||
| 20 | {{if .CanCancel}}<form class="inline" method="post" action="/{{.Name}}/runs/{{.Run.ID}}/cancel"> | ||
| 21 | 21 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | |
| 22 | 22 | <button type="submit" class="warn">{{icon "circle-x"}}{{if eq .Run.Status "running"}}Stop running run{{else}}Cancel queued run{{end}}</button> | |
| 23 | 23 | </form>{{end}} | |
| 24 | {{if .CanRerun}}<form class="inline" method="post" action="/r/{{.Name}}/runs/{{.Run.ID}}/rerun"> | ||
| 24 | {{if .CanRerun}}<form class="inline" method="post" action="/{{.Name}}/runs/{{.Run.ID}}/rerun"> | ||
| 25 | 25 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | |
| 26 | 26 | <button type="submit" class="secondary">{{icon "rotate-ccw"}}Rerun</button> | |
| 27 | 27 | </form>{{end}} | |
| @@ -53,12 +53,12 @@ | |||
| 53 | 53 | </div> | |
| 54 | 54 | <div class="card"> | |
| 55 | 55 | <span class="run-summary-label">{{icon "git-commit-horizontal"}}Commit</span> | |
| 56 | <strong><a class="sha" href="/r/{{.Name}}/commit/{{.Run.SHA}}">{{short .Run.SHA}}</a></strong> | ||
| 56 | <strong><a class="sha" href="/{{.Name}}/commit/{{.Run.SHA}}">{{short .Run.SHA}}</a></strong> | ||
| 57 | 57 | <span class="status-note">{{if .Run.Tag}}tag {{.Run.Tag}}{{else}}branch {{.Run.Branch}}{{end}}{{if eq .Run.Status "failed"}} · exit {{.Run.ExitCode}}{{end}}</span> | |
| 58 | 58 | </div> | |
| 59 | 59 | <div class="card"> | |
| 60 | 60 | <span class="run-summary-label">{{icon "file-code"}}Workflow</span> | |
| 61 | <strong><a href="/r/{{.Name}}/blob/{{.Run.SHA}}/{{pathurl .Run.Workflow}}">{{.Run.WorkflowTitle}}</a></strong> | ||
| 61 | <strong><a href="/{{.Name}}/blob/{{.Run.SHA}}/{{pathurl .Run.Workflow}}">{{.Run.WorkflowTitle}}</a></strong> | ||
| 62 | 62 | <span class="status-note"><code>{{.Run.Workflow}}</code></span> | |
| 63 | 63 | </div> | |
| 64 | 64 | </div> | |
| @@ -73,10 +73,10 @@ | |||
| 73 | 73 | {{if .Attestation}}<p class="muted">reported by <strong>{{.Signer}}</strong> · the instance accepted this result from that account's runner connection, and logged it</p>{{end}} | |
| 74 | 74 | {{if .Counts}}<p class="muted">counts as a check for this repository</p>{{else if .CountsWhy}}<p class="muted">does not count as a check: {{.CountsWhy}}</p>{{end}} | |
| 75 | 75 | ||
| 76 | <h2 class="with-more"><span>{{icon "terminal"}}Logs</span>{{if .HasLog}} <a class="more" href="/r/{{.Name}}/runs/{{.Run.ID}}/log?attempt={{.LogAttempt}}&download=1">{{icon "file"}}Download full log</a>{{end}}</h2> | ||
| 76 | <h2 class="with-more"><span>{{icon "terminal"}}Logs</span>{{if .HasLog}} <a class="more" href="/{{.Name}}/runs/{{.Run.ID}}/log?attempt={{.LogAttempt}}&download=1">{{icon "file"}}Download full log</a>{{end}}</h2> | ||
| 77 | 77 | {{if .HasLog}} | |
| 78 | 78 | {{if gt (len .Logs) 1}}<div class="run-logbar"> | |
| 79 | {{range .Logs}}<a class="chip" href="/r/{{$.Name}}/runs/{{$.Run.ID}}/log?attempt={{.Attempt}}">{{icon "file"}}attempt {{.Attempt}}</a> {{end}} | ||
| 79 | {{range .Logs}}<a class="chip" href="/{{$.Name}}/runs/{{$.Run.ID}}/log?attempt={{.Attempt}}">{{icon "file"}}attempt {{.Attempt}}</a> {{end}} | ||
| 80 | 80 | </div>{{end}} | |
| 81 | 81 | <div class="card run-log-card"> | |
| 82 | 82 | {{if .Live}} | |
| @@ -86,7 +86,7 @@ | |||
| 86 | 86 | <span class="run-log-meta">attempt {{.LogAttempt}} · <span class="run-log-state">live</span></span> | |
| 87 | 87 | </summary> | |
| 88 | 88 | <pre class="run-log-text" data-log-stream | |
| 89 | data-log-url="/r/{{.Name}}/runs/{{.Run.ID}}/log?attempt={{.LogAttempt}}" | ||
| 89 | data-log-url="/{{.Name}}/runs/{{.Run.ID}}/log?attempt={{.LogAttempt}}" | ||
| 90 | 90 | data-log-final="0"></pre> | |
| 91 | 91 | </details> | |
| 92 | 92 | {{end}} | |
| @@ -113,10 +113,10 @@ | |||
| 113 | 113 | <tr><th>File</th><th>Size</th><th>SHA-256</th><th></th></tr> | |
| 114 | 114 | {{range .Artifacts}} | |
| 115 | 115 | <tr> | |
| 116 | <td><a href="/r/{{$.Name}}/runs/{{$.Run.ID}}/artifacts/{{.Name}}">{{.Name}}</a></td> | ||
| 116 | <td><a href="/{{$.Name}}/runs/{{$.Run.ID}}/artifacts/{{.Name}}">{{.Name}}</a></td> | ||
| 117 | 117 | <td class="muted">{{bytes .Size}}</td> | |
| 118 | 118 | <td class="muted"><code>{{short .OID}}</code></td> | |
| 119 | <td><a href="/r/{{$.Name}}/runs/{{$.Run.ID}}/artifacts/{{.Name}}">download</a></td> | ||
| 119 | <td><a href="/{{$.Name}}/runs/{{$.Run.ID}}/artifacts/{{.Name}}">download</a></td> | ||
| 120 | 120 | </tr> | |
| 121 | 121 | {{end}} | |
| 122 | 122 | </table> | |