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.
List a change's linked issues in a Details section
cad93cfe2b6d4ed4c3ed5a1431af4ecb194484ce · Keenan Nemetz · 11d ago · parent 5c22953e
List a change's linked issues in a Details section The conversation sidebar showed linked issues as one comma-separated line, so there was no way to see what each link was or change it without the CLI. The Details section lists them with the same rows the overview uses for recent issues, and the change's author or a maintainer can link another issue or remove one while it is open. Both controls go through SetRequestCloses, so the browser and 'vole change update --closes' write the same metadata.
server/web/templates/requests.html +37−5
| @@ -123,11 +123,6 @@ | |||
| 123 | 123 | {{else}} | |
| 124 | 124 | <p class="muted">Merges into {{.Request.Base}} cleanly.</p> | |
| 125 | 125 | {{end}}{{end}} | |
| 126 | {{if .Request.Closes}} | ||
| 127 | <p class="muted">Closes | ||
| 128 | {{range $i, $id := .Request.Closes}}{{if $i}}, {{end}}<a href="/r/{{$.Name}}/issues/{{$id}}">{{num (index $.Numbers $id)}}</a>{{end}} | ||
| 129 | when merged.</p> | ||
| 130 | {{end}} | ||
| 131 | 126 | {{if .CanRetarget}} | |
| 132 | 127 | <form method="post" action="/r/{{.Name}}/requests/{{.Request.ID}}/target" class="request-target"> | |
| 133 | 128 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | |
| @@ -163,6 +158,8 @@ | |||
| 163 | 158 | ||
| 164 | 159 | {{template "request_changes" .}} | |
| 165 | 160 | ||
| 161 | {{template "request_details" .}} | ||
| 162 | |||
| 166 | 163 | <section> | |
| 167 | 164 | <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> | |
| 168 | 165 | <p class="muted">{{if .Required}}{{.Current}} of {{.Required}} required approval(s).{{else}}No approvals required.{{end}}</p> | |
| @@ -231,6 +228,41 @@ | |||
| 231 | 228 | </div> | |
| 232 | 229 | {{end}} | |
| 233 | 230 | ||
| 231 | {{define "request_details"}} | ||
| 232 | <section id="request-details"> | ||
| 233 | <h2>{{icon "circle-dot"}}Details{{template "help" "Issues linked to this change close when it is merged. An open change can be relinked by its author or a maintainer."}}</h2> | ||
| 234 | {{if .LinkedIssues}} | ||
| 235 | <div class="side-list"> | ||
| 236 | {{range .LinkedIssues}} | ||
| 237 | <div class="request-issue"> | ||
| 238 | <a class="side-issue" href="/r/{{$.Name}}/issues/{{.ID}}"> | ||
| 239 | <span class="side-subject"><span class="side-num">{{num .Number}}</span>{{.Title}}</span> | ||
| 240 | <span class="side-meta">{{who .Author}}{{if not .Created.IsZero}}<span>{{since .Created.Unix}}</span>{{end}}</span> | ||
| 241 | </a> | ||
| 242 | {{if $.CanEditIssues}} | ||
| 243 | <form method="post" action="/r/{{$.Name}}/requests/{{$.Request.ID}}/issues" hx-post="/r/{{$.Name}}/requests/{{$.Request.ID}}/issues" hx-target="#request-details" hx-swap="outerHTML"> | ||
| 244 | <input type="hidden" name="csrf" value="{{$.CSRF}}"> | ||
| 245 | <input type="hidden" name="issue" value="{{.ID}}"> | ||
| 246 | <button class="link" type="submit" name="action" value="remove" title="Remove this issue from the change" aria-label="Remove {{num .Number}} from this change">{{icon "x"}}Remove</button> | ||
| 247 | </form> | ||
| 248 | {{end}} | ||
| 249 | </div> | ||
| 250 | {{end}} | ||
| 251 | </div> | ||
| 252 | {{else}} | ||
| 253 | <p class="muted">No linked issues.</p> | ||
| 254 | {{end}} | ||
| 255 | {{if .CanEditIssues}} | ||
| 256 | <form method="post" action="/r/{{.Name}}/requests/{{.Request.ID}}/issues" class="request-issue-add" hx-post="/r/{{.Name}}/requests/{{.Request.ID}}/issues" hx-target="#request-details" hx-swap="outerHTML"> | ||
| 257 | <input type="hidden" name="csrf" value="{{.CSRF}}"> | ||
| 258 | <input name="issue" type="text" placeholder="#42 or issue id" aria-label="Issue number or id to link"> | ||
| 259 | <button class="secondary" type="submit" name="action" value="add">{{icon "plus"}}Link issue</button> | ||
| 260 | </form> | ||
| 261 | {{end}} | ||
| 262 | {{if .DetailsError}}<p class="error">{{.DetailsError}}</p>{{end}} | ||
| 263 | </section> | ||
| 264 | {{end}} | ||
| 265 | |||
| 234 | 266 | {{define "request_inline_comment"}} | |
| 235 | 267 | <tr class="inline-comment"> | |
| 236 | 268 | <td colspan="4"> | |