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.
Merge the landing facts into the Review section
ad4d93489a023ec688702a889c53adf4c990dcfa · Keenan Nemetz · 11d ago · parent 59c0625b
Merge the landing facts into the Review section The merge check and closes links describe the same base/head target the Review controls do, so they now live under Review instead of a separate What would land heading. Changes moves between Review and Approvals, and HTMX write fragments compute the landing facts so they render the complete sidebar.
server/web/templates/requests.html +14−22
| @@ -80,25 +80,6 @@ | |||
| 80 | 80 | name, so a pointer, a keyboard and a screen reader get the same words. */}} | |
| 81 | 81 | {{define "help"}}<span class="help" tabindex="0" role="note" aria-label="{{.}}" data-tip="{{.}}">?</span>{{end}} | |
| 82 | 82 | ||
| 83 | {{define "request_landing"}} | ||
| 84 | {{if or .MergeChecked .Request.Closes}} | ||
| 85 | <section> | ||
| 86 | <h2>{{icon "git-pull-request"}}What would land</h2> | ||
| 87 | {{if .MergeChecked}}{{if .Conflicts}} | ||
| 88 | <p class="conflict">This branch no longer merges into {{.Request.Base}} cleanly: | ||
| 89 | {{range .Conflicts}}<code>{{.}}</code> {{end}}— rebase or merge {{.Request.Base}} before landing it.</p> | ||
| 90 | {{else}} | ||
| 91 | <p class="muted">Merges into {{.Request.Base}} cleanly.</p> | ||
| 92 | {{end}}{{end}} | ||
| 93 | {{if .Request.Closes}} | ||
| 94 | <p class="muted">Closes | ||
| 95 | {{range $i, $id := .Request.Closes}}{{if $i}}, {{end}}<a href="/r/{{$.Name}}/issues/{{$id}}">{{num (index $.Numbers $id)}}</a>{{end}} | ||
| 96 | when merged.</p> | ||
| 97 | {{end}} | ||
| 98 | </section> | ||
| 99 | {{end}} | ||
| 100 | {{end}} | ||
| 101 | |||
| 102 | 83 | {{define "request_changes"}} | |
| 103 | 84 | <section> | |
| 104 | 85 | <h2 class="with-more"><span>{{icon "file"}}Changes</span>{{if .FileCount}} <a class="more" href="/r/{{.Name}}/requests/{{.Request.ID}}/files">View changes</a>{{end}}</h2> | |
| @@ -122,8 +103,6 @@ | |||
| 122 | 103 | hx-trigger="every 20s [document.visibilityState === 'visible' && (!document.activeElement || !document.activeElement.closest('#request-aside'))]" | |
| 123 | 104 | hx-sync="this:replace" | |
| 124 | 105 | hx-swap="outerHTML"> | |
| 125 | {{template "request_landing" .}} | ||
| 126 | {{template "request_changes" .}} | ||
| 127 | 106 | {{template "request_sidebar" .}} | |
| 128 | 107 | </div> | |
| 129 | 108 | {{end}} | |
| @@ -132,7 +111,18 @@ | |||
| 132 | 111 | <div id="request-sidebar"> | |
| 133 | 112 | {{if .Error}}<p class="error">{{.Error}}</p>{{end}} | |
| 134 | 113 | <section> | |
| 135 | <h2 class="with-more"><span>{{icon "git-branch"}}Review{{template "help" "The request follows its head branch, so a push moves the head with it. Changing the base or head starts approvals over."}}</span> <a class="more sha" href="/r/{{.Name}}/commit/{{.Request.Head}}" title="commit under review">{{short .Request.Head}}</a></h2> | ||
| 114 | <h2 class="with-more"><span>{{icon "git-branch"}}Review{{template "help" "The request follows its head branch, so a push moves the head with it. Changing the base or head starts approvals over. A conflict here blocks landing."}}</span> <a class="more sha" href="/r/{{.Name}}/commit/{{.Request.Head}}" title="commit under review">{{short .Request.Head}}</a></h2> | ||
| 115 | {{if .MergeChecked}}{{if .Conflicts}} | ||
| 116 | <p class="conflict">This branch no longer merges into {{.Request.Base}} cleanly: | ||
| 117 | {{range .Conflicts}}<code>{{.}}</code> {{end}}— rebase or merge {{.Request.Base}} before landing it.</p> | ||
| 118 | {{else}} | ||
| 119 | <p class="muted">Merges into {{.Request.Base}} cleanly.</p> | ||
| 120 | {{end}}{{end}} | ||
| 121 | {{if .Request.Closes}} | ||
| 122 | <p class="muted">Closes | ||
| 123 | {{range $i, $id := .Request.Closes}}{{if $i}}, {{end}}<a href="/r/{{$.Name}}/issues/{{$id}}">{{num (index $.Numbers $id)}}</a>{{end}} | ||
| 124 | when merged.</p> | ||
| 125 | {{end}} | ||
| 136 | 126 | {{if .CanRetarget}} | |
| 137 | 127 | <form method="post" action="/r/{{.Name}}/requests/{{.Request.ID}}/target" class="request-target"> | |
| 138 | 128 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | |
| @@ -166,6 +156,8 @@ | |||
| 166 | 156 | {{end}} | |
| 167 | 157 | </section> | |
| 168 | 158 | ||
| 159 | {{template "request_changes" .}} | ||
| 160 | |||
| 169 | 161 | <section> | |
| 170 | 162 | <h2>{{icon "check"}}Approvals{{template "help" "Approving names the current base and head; a new base or head starts over. An approval stops counting if its author is retired or no longer maintains the repository."}}</h2> | |
| 171 | 163 | <p class="muted">{{if .Required}}{{.Current}} of {{.Required}} required approval(s).{{else}}No approvals required.{{end}}</p> | |