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.
Show an issue's linked changes and commits in the sidebar
fd9aa8ed41eb04a21fe73fbc0c6bd14762abd735 · Keenan Nemetz · 1d ago · parent c980fe53
server/web/templates/issues.html +40−18
| @@ -208,6 +208,44 @@ | |||
| 208 | 208 | </article> | |
| 209 | 209 | {{end}} | |
| 210 | 210 | ||
| 211 | {{/* A change request that names the issue in its closes list is a reference the | ||
| 212 | issue can show back. The rows are the compact shape the overview and the | ||
| 213 | change sidebar already use, so the reader does not learn a second one. */}} | ||
| 214 | {{define "issue_linked_changes"}} | ||
| 215 | {{if .LinkedChanges}} | ||
| 216 | <section id="issue-changes"> | ||
| 217 | <h2>{{icon "git-pull-request"}}Referenced in changes</h2> | ||
| 218 | <div class="side-list"> | ||
| 219 | {{range .LinkedChanges}} | ||
| 220 | <a class="side-change" href="/r/{{$.Name}}/changes/{{.ID}}"> | ||
| 221 | <span class="side-subject"><span class="side-num">{{num .Number}}</span>{{.Title}}</span> | ||
| 222 | <span class="side-meta"><span class="state {{.State}}">{{.State}}</span>{{who .Author}}{{if not .Created.IsZero}}<span>{{since .Created.Unix}}</span>{{end}}</span> | ||
| 223 | </a> | ||
| 224 | {{end}} | ||
| 225 | </div> | ||
| 226 | </section> | ||
| 227 | {{end}} | ||
| 228 | {{end}} | ||
| 229 | |||
| 230 | {{/* Commits are the other way a branch mentions an issue. git does the search, | ||
| 231 | so the section shows the same rows the full-width table did, in the side | ||
| 232 | column's compact shape. */}} | ||
| 233 | {{define "issue_backlinks"}} | ||
| 234 | {{if .Backlinks}} | ||
| 235 | <section id="issue-commits"> | ||
| 236 | <h2>{{icon "git-commit-horizontal"}}Referenced in commits</h2> | ||
| 237 | <div class="side-list"> | ||
| 238 | {{range .Backlinks}} | ||
| 239 | <a class="side-commit" href="/r/{{$.Name}}/commit/{{.SHA}}"> | ||
| 240 | <span class="side-subject">{{.Subject}}</span> | ||
| 241 | <span class="side-meta"><span class="sha">{{short .SHA}}</span>{{if .Author}}<span>{{.Author}}</span>{{end}}<span>{{since .When}}</span></span> | ||
| 242 | </a> | ||
| 243 | {{end}} | ||
| 244 | </div> | ||
| 245 | </section> | ||
| 246 | {{end}} | ||
| 247 | {{end}} | ||
| 248 | |||
| 211 | 249 | {{define "issue"}} | |
| 212 | 250 | {{template "header" .}} | |
| 213 | 251 | {{template "repohead" (nav .Page "issues")}} | |
| @@ -219,29 +257,13 @@ | |||
| 219 | 257 | {{template "issue_description" .}} | |
| 220 | 258 | ||
| 221 | 259 | {{template "comment_thread" .Thread}} | |
| 222 | |||
| 223 | {{if .Backlinks}} | ||
| 224 | <h2>{{icon "git-branch"}}Referenced in commits</h2> | ||
| 225 | <div class="panel"> | ||
| 226 | <table> | ||
| 227 | <tbody> | ||
| 228 | {{range .Backlinks}} | ||
| 229 | <tr> | ||
| 230 | <td class="sha"><a href="/r/{{$.Name}}/commit/{{.SHA}}">{{short .SHA}}</a></td> | ||
| 231 | <td><a href="/r/{{$.Name}}/commit/{{.SHA}}">{{.Subject}}</a></td> | ||
| 232 | <td class="muted">{{.Author}}</td> | ||
| 233 | <td class="muted nowrap">{{since .When}}</td> | ||
| 234 | </tr> | ||
| 235 | {{end}} | ||
| 236 | </tbody> | ||
| 237 | </table> | ||
| 238 | </div> | ||
| 239 | {{end}} | ||
| 240 | 260 | </div> | |
| 241 | 261 | ||
| 242 | 262 | <aside class="thread-side"> | |
| 243 | 263 | {{template "issue_labels" .}} | |
| 244 | 264 | {{template "issue_assignees" .}} | |
| 265 | {{template "issue_linked_changes" .}} | ||
| 266 | {{template "issue_backlinks" .}} | ||
| 245 | 267 | </aside> | |
| 246 | 268 | </div> | |
| 247 | 269 | {{template "footer" .}} | |