Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Search for an issue when linking it to a change

838f282eebf7e68f61318eae93d03263df1341df · Keenan Nemetz · 10d ago · parent 267feec2

Search for an issue when linking it to a change

The link field only accepted an id that the author already knew. It is now a search box over the issue index that matches a title, a #number, or a ULID prefix. A matching issue is a button: picking one posts the same link write and replaces the Issues section with the new list. Issues already linked are left out of the results.

server/web/templates/requests.html +24−4

@@ -253,16 +253,36 @@
253 253 <p class="muted">No linked issues.</p>
254 254 {{end}}
255 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-issues" 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>
256 <form class="request-issue-search" hx-get="/r/{{.Name}}/requests/{{.Request.ID}}/issues/search" hx-trigger="input changed delay:250ms, search, submit" hx-target="#request-issue-results" hx-swap="innerHTML">
257 <input name="q" type="search" placeholder="Search by title, #number, or ULID" aria-label="Search issues by title, number, or ULID" autocomplete="off">
260 258 </form>
259 <div id="request-issue-results" class="request-issue-results" aria-live="polite"></div>
261 260 {{end}}
262 261 {{if .IssuesError}}<p class="error">{{.IssuesError}}</p>{{end}}
263 262 </section>
264 263 {{end}}
265 264
265 {{define "request_issue_search"}}
266 {{if .Error}}
267 <p class="error">{{.Error}}</p>
268 {{else if .Results}}
269 <div class="request-issue-matches">
270 {{range .Results}}
271 <form method="post" action="/r/{{$.Name}}/requests/{{$.Request.ID}}/issues" class="request-issue-match" hx-post="/r/{{$.Name}}/requests/{{$.Request.ID}}/issues" hx-target="#request-issues" hx-swap="outerHTML">
272 <input type="hidden" name="csrf" value="{{$.CSRF}}">
273 <input type="hidden" name="issue" value="{{.ID}}">
274 <button type="submit" name="action" value="add" title="Link {{num .Number}}">
275 <span class="side-subject"><span class="side-num">{{num .Number}}</span>{{.Title}}</span>
276 <span class="side-meta">{{who .Author}}{{if not .Created.IsZero}}<span>{{since .Created.Unix}}</span>{{end}}</span>
277 </button>
278 </form>
279 {{end}}
280 </div>
281 {{else if .Query}}
282 <p class="muted">No issues match “{{.Query}}”.</p>
283 {{end}}
284 {{end}}
285
266 286 {{define "request_inline_comment"}}
267 287 <tr class="inline-comment">
268 288 <td colspan="4">