vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Show every commit of a change request, paginated
ea92d7546124954c790c34f3f7655c35cb70bf76 · Keenan Nemetz · 1d ago · parent 31560d91
Show every commit of a change request, paginated The request page showed the diff and the runs but not the commits the branch is made of, so a reviewer who reads commit by commit had to leave it for the repository history. Add a Commits tab that lists them oldest first, each linking to its commit page. Page the list with the existing pager rather than cutting it at a fixed count: a long branch keeps every commit and a page step swaps only the list. While the request is open the range is base..head; once landed it starts at the recorded pre-landing base, so the commits that were reviewed remain visible and the landing merge commit is not listed as one of them.
server/web/templates/request_commits.html +50
| @@ -0,0 +1,50 @@ | |||
| 1 | {{define "request_commits"}} | ||
| 2 | {{template "header" .}} | ||
| 3 | {{template "repohead" (nav .Page "changes")}} | ||
| 4 | {{template "request_head" .}} | ||
| 5 | {{template "request_tabs" .}} | ||
| 6 | |||
| 7 | <div class="thread"> | ||
| 8 | <div class="thread-main"> | ||
| 9 | {{template "request_commit_list" .}} | ||
| 10 | </div> | ||
| 11 | |||
| 12 | <aside class="thread-side"> | ||
| 13 | {{template "request_aside" .}} | ||
| 14 | </aside> | ||
| 15 | </div> | ||
| 16 | {{template "footer" .}} | ||
| 17 | {{end}} | ||
| 18 | |||
| 19 | {{/* The list is its own fragment because the pager replaces it in place: a page | ||
| 20 | step must not reload the conversation, the tabs, or the sidebar. */}} | ||
| 21 | {{define "request_commit_list"}} | ||
| 22 | <section id="request-commits"> | ||
| 23 | <div class="with-more"> | ||
| 24 | <h2>{{icon "git-commit-horizontal"}}Commits</h2> | ||
| 25 | {{if .Pager.Total}}<span class="muted">{{.Pager.Total}} commit{{if ne .Pager.Total 1}}s{{end}}, oldest first</span>{{end}} | ||
| 26 | </div> | ||
| 27 | |||
| 28 | {{if .Commits}} | ||
| 29 | <div class="panel"> | ||
| 30 | <table class="commits"> | ||
| 31 | <tbody> | ||
| 32 | {{range .Commits}} | ||
| 33 | <tr> | ||
| 34 | <td class="sha"><a href="/{{$.Name}}/commit/{{.SHA}}">{{short .SHA}}</a></td> | ||
| 35 | <td><a href="/{{$.Name}}/commit/{{.SHA}}">{{.Subject}}</a></td> | ||
| 36 | <td class="muted">{{.Author}}</td> | ||
| 37 | <td class="muted nowrap">{{since .When}}</td> | ||
| 38 | </tr> | ||
| 39 | {{end}} | ||
| 40 | </tbody> | ||
| 41 | </table> | ||
| 42 | </div> | ||
| 43 | {{template "pager" .Pager}} | ||
| 44 | {{else if .AlreadyMerged}} | ||
| 45 | <p class="muted">Already merged into {{.Request.Base}}.</p> | ||
| 46 | {{else}} | ||
| 47 | <div class="empty-state"><p>No commits, or the head is not reachable from this repository yet.</p></div> | ||
| 48 | {{end}} | ||
| 49 | </section> | ||
| 50 | {{end}} | ||