internal/web/templates/settings.html

403 lines · 27578 bytes

  1{{define "width"}}wide{{end}}
  2{{define "title"}}settings · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
  3{{define "content"}}
  4{{$base := printf "/%s/%s/settings" .Repo.OwnerName .Repo.Name}}
  5<h1>Settings</h1>
  6{{if .Notice}}{{if .Saved}}<p class="notice" role="status">{{.Notice}}</p>{{else}}<p class="error" role="alert">{{.Notice}}{{if .Reauth}} <a href="/login">Sign in again</a>{{end}}</p>{{end}}{{end}}
  7<div class="withcol narrow">
  8<nav class="sidecol" aria-label="Sections">
  9<details class="sidedrop">
 10<summary><span class="sideword">Sections</span></summary>
 11  <div class="grp"><h2 class="colhead">Sections</h2>
 12  <ul>
 13    <li><a href="#identity">Identity</a></li>
 14    <li><a href="#access">Access</a></li>
 15    <li><a href="#webhooks">Webhooks</a></li>
 16    <li><a href="#gates">Merge gates</a></li>
 17    {{if or .ScanAvailable .Security.Enabled}}<li><a href="#security">Code scanning</a></li>{{end}}
 18    <li><a href="#secrets">Secret scan</a></li>
 19    <li><a href="#branches">Protected branches</a></li>
 20    <li><a href="#tags">Protected tags</a></li>
 21    <li><a href="#deps">Dependencies</a></li>
 22    <li><a href="#runners">Runners</a></li>
 23    <li><a href="#lifecycle">Lifecycle</a></li>
 24  </ul></div>
 25</details>
 26</nav>
 27<div class="colmain">
 28
 29<section id="identity"><h2>Identity</h2>
 30<form method="post" action="{{$base}}" class="setform">
 31  <input type="hidden" name="field" value="description">
 32  <div><label for="description">Description</label></div>
 33  <div><input type="text" id="description" name="description" value="{{or (index .Submitted "description") .Desc}}" placeholder="one line, shown in listings"></div>
 34  <div><button type="submit">Save</button></div>
 35</form>
 36<form method="post" action="{{$base}}" class="setform">
 37  <input type="hidden" name="field" value="website">
 38  <div><label for="website">Website</label></div>
 39  <div><input type="text" id="website" name="website" value="{{or (index .Submitted "website") .Repo.Settings.Website}}" placeholder="https://example.org"></div>
 40  <div><button type="submit" class="btn">Save</button></div>
 41</form>
 42<form method="post" action="{{$base}}" class="setform">
 43  <input type="hidden" name="field" value="topics">
 44  <div><label for="topics">Topics</label><p class="hint">Comma separated, lower case.</p></div>
 45  <div><input type="text" id="topics" name="topics" value="{{or (index .Submitted "topics") (join .Topics ", ")}}"></div>
 46  <div><button type="submit" class="btn">Save</button></div>
 47</form>
 48{{if .Branches}}<form method="post" action="{{$base}}" class="setform">
 49  <input type="hidden" name="field" value="default-branch">
 50  <div><label for="default-branch">Default branch</label></div>
 51  <div><select id="default-branch" name="default-branch">{{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}}</select></div>
 52  <div><button type="submit" class="btn">Save</button></div>
 53</form>{{end}}
 54</section>
 55
 56<section id="access"><h2>Access</h2>
 57<form method="post" action="{{$base}}" class="setform">
 58  <input type="hidden" name="field" value="visibility">
 59  <div><span class="fieldname">Visibility</span></div>
 60  <div class="check">
 61    <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label>
 62    <label><input type="radio" name="visibility" value="private"{{if eq .Repo.Visibility "private"}} checked{{end}}> Private</label>
 63  </div>
 64  <div><button type="submit" class="btn">Save</button></div>
 65</form>
 66<form method="post" action="{{$base}}" class="setform">
 67  <input type="hidden" name="field" value="git-daemon">
 68  <div><label for="git-daemon">Serve over git://</label><p class="hint">Public repositories only.</p></div>
 69  <div class="check"><input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}></div>
 70  <div><button type="submit" class="btn">Save</button></div>
 71</form>
 72<h3>Who can reach this repository</h3>
 73{{if .Access}}<div class="tablewrap"><table class="keys">
 74<thead><tr class="cols"><th scope="col">user</th><th scope="col">role</th><th scope="col">via</th><th scope="col"><span class="vh">actions</span></th></tr></thead>
 75<tbody>{{range .Access}}<tr>
 76  <td class="mono"><a href="/{{.User}}">{{.User}}</a></td>
 77  <td>{{.Role}}</td>
 78  <td>{{.Source}}</td>
 79  <td class="act">{{if eq .Source "direct"}}<form method="post" action="{{$base}}" class="inline">
 80    <input type="hidden" name="field" value="access-revoke">
 81    <input type="hidden" name="user" value="{{.User}}">
 82    <button type="submit" class="danger">Revoke</button>
 83  </form>{{end}}</td>
 84</tr>{{end}}</tbody></table></div>
 85{{else}}<p class="meta">Nobody else can reach it.</p>{{end}}
 86<form method="post" action="{{$base}}" class="setform">
 87  <input type="hidden" name="field" value="access-grant">
 88  <div><label for="grant-user">Grant access</label><p class="hint">An account name and a role. A grant adds to what an organization or team already gives.</p></div>
 89  <div><input type="text" id="grant-user" name="user" value="{{index .Submitted "user"}}" autocomplete="off" spellcheck="false" placeholder="username">
 90  <select name="role" aria-label="Role">{{$role := index .Submitted "role"}}<option value="read"{{if eq $role "read"}} selected{{end}}>read</option><option value="write"{{if eq $role "write"}} selected{{end}}>write</option><option value="admin"{{if eq $role "admin"}} selected{{end}}>admin</option></select></div>
 91  <div><button type="submit" class="btn">Grant</button></div>
 92</form>
 93</section>
 94
 95<section id="webhooks"><h2>Webhooks</h2>
 96{{if .Hooks}}
 97<ul class="protlist">
 98{{range .Hooks}}<li><span class="mono">#{{.ID}}</span> <code>{{.URL}}</code> <span class="meta">{{.Events}}{{if .Secret}}, signed{{end}}</span>
 99  <form method="post" action="{{$base}}" class="inline">
100    <input type="hidden" name="field" value="webhook-remove">
101    <input type="hidden" name="id" value="{{.ID}}">
102    <button type="submit" class="danger">Remove</button>
103  </form></li>
104{{end}}
105</ul>
106{{else}}<p class="meta">No webhooks.</p>{{end}}
107<form method="post" action="{{$base}}" class="setform stack" autocomplete="off">
108  <input type="hidden" name="field" value="webhook-add">
109  <label for="hook-url">Add a webhook</label>
110  <input type="text" id="hook-url" name="url" value="{{index .Submitted "url"}}" placeholder="https://ci.example.org/hook" spellcheck="false">
111  <label for="hook-events">Events</label>
112  <p class="hint">Comma separated, or <code>*</code> for all.</p>
113  <input type="text" id="hook-events" name="events" value="{{or (index .Submitted "events") "*"}}" spellcheck="false">
114  <label for="hook-secret">Secret</label>
115  <p class="hint">Optional. Signs each delivery; it is not shown again.</p>
116  <input type="password" id="hook-secret" name="secret" value="" autocomplete="new-password">
117  <button type="submit" class="btn">Add</button>
118</form>
119<h3>Recent deliveries</h3>
120{{if .Deliveries}}<div class="tablewrap"><table class="keys">
121<thead><tr class="cols"><th scope="col">id</th><th scope="col">event</th><th scope="col">url</th><th scope="col">state</th><th scope="col"><span class="vh">actions</span></th></tr></thead>
122<tbody>{{range .Deliveries}}<tr>
123  <td class="mono">{{.ID}}</td>
124  <td>{{.Event}}</td>
125  <td class="mono">{{.URL}}</td>
126  <td>{{.Status}} ({{.Attempts}} attempts){{if .LastError}}<br><span class="meta">{{.LastError}}</span>{{end}}</td>
127  <td class="act"><form method="post" action="{{$base}}" class="inline">
128    <input type="hidden" name="field" value="webhook-redeliver">
129    <input type="hidden" name="delivery" value="{{.ID}}">
130    <button type="submit" class="btn">Redeliver</button>
131  </form></td>
132</tr>{{end}}</tbody></table></div>
133{{else}}<p class="meta">Nothing delivered yet.</p>{{end}}
134</section>
135
136<section id="gates"><h2>Merge gates</h2>
137<p class="meta">Checked before a merge, in this order: checks, approvals, resolved threads, signatures.</p>
138<form method="post" action="{{$base}}" class="setform">
139  <input type="hidden" name="field" value="require-checks">
140  <div><label for="require-checks">Required checks</label><p class="hint">Requires CI to succeed.{{with .Repo.Settings.RequiredContexts}} Also waits for {{range $i, $c := .}}{{if $i}}, {{end}}<code>{{$c}}</code>{{end}} until they report{{if not $.Repo.Settings.RequireChecks}}, once this is on{{end}}.{{end}}</p></div>
141  <div class="check"><input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}></div>
142  <div><button type="submit" class="btn">Save</button></div>
143</form>
144<form method="post" action="{{$base}}" class="setform">
145  <input type="hidden" name="field" value="require-contexts">
146  <div><label for="contexts">Required contexts</label><p class="hint">Statuses the checks gate waits for until they report, separated by spaces. Saving any turns required checks on; saving none leaves it as it is.</p></div>
147  <div><input type="text" id="contexts" name="contexts" value="{{range $i, $c := .Repo.Settings.RequiredContexts}}{{if $i}} {{end}}{{$c}}{{end}}" autocomplete="off"></div>
148  <div><button type="submit" class="btn">Save</button></div>
149</form>
150<form method="post" action="{{$base}}" class="setform">
151  <input type="hidden" name="field" value="require-approvals">
152  <div><label for="approvals">Approvals</label><p class="hint">Approvals from anyone with write access. Zero means none required.</p></div>
153  <div class="num"><input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"></div>
154  <div><button type="submit" class="btn">Save</button></div>
155</form>
156<form method="post" action="{{$base}}" class="setform">
157  <input type="hidden" name="field" value="require-resolved">
158  <div><label for="require-resolved">Review threads</label><p class="hint">Every thread on the diff must be resolved before merging.</p></div>
159  <div class="check"><input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}></div>
160  <div><button type="submit" class="btn">Save</button></div>
161</form>
162<form method="post" action="{{$base}}" class="setform">
163  <input type="hidden" name="field" value="require-codeowners">
164  <div><label for="require-codeowners">CODEOWNERS</label><p class="hint">Code owners must approve.</p></div>
165  <div class="check"><input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}></div>
166  <div><button type="submit" class="btn">Save</button></div>
167</form>
168<form method="post" action="{{$base}}" class="setform">
169  <input type="hidden" name="field" value="require-signed">
170  <div><label for="require-signed">Signed commits</label><p class="hint">Every commit in the request must carry a verified signature. Squash and merge strategies are refused, since both mint an unsigned commit.</p></div>
171  <div class="check"><input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}></div>
172  <div><button type="submit" class="btn">Save</button></div>
173</form>
174</section>
175
176{{if or .ScanAvailable .Security.Enabled}}<section id="security"><h2>Code scanning</h2>
177<form method="post" action="{{$base}}" class="setform">
178  <input type="hidden" name="field" value="security">
179  <div><label for="security-enabled">Scheduled scan</label><p class="hint">Runs the instance's code scanner over <code>{{.Repo.DefaultBranch}}</code> on its schedule, on a runner attached to this repository, and keeps an issue of what it finds.</p></div>
180  <div class="check"><input type="checkbox" id="security-enabled" name="security" value="on"{{if .Security.Enabled}} checked{{end}}></div>
181  <div><button type="submit" class="btn">Save</button></div>
182</form>
183{{if .ScanAvailable}}<form method="post" action="{{$base}}" class="setform">
184  <input type="hidden" name="field" value="security-frequency">
185  <div><label for="security-frequency">Frequency</label><p class="hint">Daily, weekly on Sunday, or monthly on the 1st, at {{printf "%02d:00" .ScanHour}} UTC.</p></div>
186  <div><select id="security-frequency" name="security-frequency">{{$freq := .ScanFrequency}}{{range .ScanFrequencies}}<option value="{{.}}"{{if eq . $freq}} selected{{end}}>{{.}}</option>{{end}}</select></div>
187  <div><button type="submit" class="btn">Save</button></div>
188</form>{{end}}
189{{if .Security.Enabled}}
190<p class="meta">Next scan {{.Security.NextRun}} · last results {{if .Security.LastResults}}{{when .Security.LastResults}}{{else}}never{{end}}{{if .Security.IssueNumber}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Security.IssueNumber}}">#{{.Security.IssueNumber}}</a>{{end}}</p>
191{{with .Security.Aside}}{{if .Any}}<p class="meta">Set aside by the last scan:{{if .Ignored}} {{.Ignored}} under the paths or rules below, or marked vendored or generated in <code>.gitattributes</code>.{{end}}{{range $lib, $n := .Unused}} {{$n}} from {{$lib}} rules, which no manifest names.{{end}}{{if .Quoted}} {{.Quoted}} unquoted-attribute hits on attributes the template quotes.{{end}}</p>{{end}}{{end}}
192{{if .Security.Findings}}<div class="tablewrap"><table class="keys">
193<tr class="cols"><th scope="col">location</th><th scope="col">rule</th><th scope="col">level</th><th scope="col"><span class="vh">dismiss</span></th></tr>
194{{range .Security.Findings}}<tr>
195  <td class="mono">{{.Path}}:{{.Line}}</td>
196  <td class="mono">{{.Rule}}</td>
197  <td>{{.Level}}</td>
198  <td><form method="post" action="{{$base}}" class="inline">
199    <input type="hidden" name="field" value="security-dismiss">
200    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
201    <select name="reason" aria-label="Reason"><option value="false-positive">False positive</option><option value="wont-fix">Won't fix</option><option value="test">Used in tests</option></select>
202    <button type="submit">Dismiss</button>
203  </form></td>
204</tr>
205{{end}}</table></div>
206{{else if .Security.LastResults}}<p class="none">The last scan found nothing open.</p>{{end}}
207{{if .Security.Dismissed}}<h3>Dismissed</h3><div class="tablewrap"><table class="keys">
208<tr class="cols"><th scope="col">location</th><th scope="col">rule</th><th scope="col">reason</th><th scope="col"><span class="vh">reopen</span></th></tr>
209{{range .Security.Dismissed}}<tr>
210  <td class="mono">{{.Path}}:{{.Line}}</td>
211  <td class="mono">{{.Rule}}</td>
212  <td>{{.Reason}}{{if .DismissedBy}} <span class="meta">by {{.DismissedBy}}</span>{{end}}</td>
213  <td><form method="post" action="{{$base}}" class="inline">
214    <input type="hidden" name="field" value="security-reopen">
215    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
216    <button type="submit">Reopen</button>
217  </form></td>
218</tr>
219{{end}}</table></div>{{end}}
220{{end}}
221<form method="post" action="{{$base}}" class="setform">
222  <input type="hidden" name="field" value="security-ignore">
223  <div><label for="security-ignore">Ignored paths</label><p class="hint">Findings under these paths are set aside from the next scan. Path globs separated by spaces: <code>testdata/**</code>, <code>web/templates/*.html</code>. Paths <code>.gitattributes</code> marks <code>linguist-vendored</code> or <code>linguist-generated</code> are set aside without being listed.</p></div>
224  <div><input type="text" id="security-ignore" name="security-ignore" value="{{join .Repo.Settings.SecurityIgnore " "}}"></div>
225  <div><button type="submit" class="btn">Save</button></div>
226</form>
227<form method="post" action="{{$base}}" class="setform">
228  <input type="hidden" name="field" value="security-exclude-rule">
229  <div><label for="security-exclude-rule">Excluded rules</label><p class="hint">Findings from these rules are set aside from the next scan. A rule id or a family of them, separated by spaces: <code>swift.lang.crypto.insecure-random</code>, <code>javascript.browser</code>.</p></div>
230  <div><input type="text" id="security-exclude-rule" name="security-exclude-rule" value="{{join .Repo.Settings.SecurityExcludeRules " "}}"></div>
231  <div><button type="submit" class="btn">Save</button></div>
232</form>
233</section>
234{{end}}
235
236<section id="secrets"><h2>Secret scan</h2>
237<form method="post" action="{{$base}}" class="setform">
238  <input type="hidden" name="field" value="secret-scan">
239  <div><label for="secret-scan">Pushes</label><p class="hint">Each push's new files are checked for credentials in known formats. Warn accepts the push and tells the pusher where; block refuses it. Only the path, line and kind of credential are reported, never the value.</p></div>
240  <div><select id="secret-scan" name="secret-scan">{{$mode := or .Repo.Settings.SecretScan "warn"}}<option value="off"{{if eq $mode "off"}} selected{{end}}>off</option><option value="warn"{{if eq $mode "warn"}} selected{{end}}>warn</option><option value="block"{{if eq $mode "block"}} selected{{end}}>block</option></select></div>
241  <div><button type="submit" class="btn">Save</button></div>
242</form>
243<form method="post" action="{{$base}}" class="setform">
244  <input type="hidden" name="field" value="secret-scan-allow">
245  <div><label for="secret-scan-allow">Allowed paths</label><p class="hint">Findings under these paths are ignored, for test fixtures. Path globs separated by spaces: <code>testdata/**</code>, <code>*_test.go</code>.</p></div>
246  <div><input type="text" id="secret-scan-allow" name="secret-scan-allow" value="{{join .Repo.Settings.SecretScanAllow " "}}"></div>
247  <div><button type="submit" class="btn">Save</button></div>
248</form>
249</section>
250
251<section id="branches"><h2>Protected branches</h2>
252{{if .Repo.Settings.ProtectedBranches}}
253<ul class="protlist">
254{{$mr := .Repo.Settings.RequireMR}}{{range .Repo.Settings.ProtectedBranches}}<li><code>{{.}}</code>{{if $mr}} <span class="hint">Direct pushes refused, merge requests only.</span>{{end}}
255  <form method="post" action="{{$base}}" class="inline">
256    <input type="hidden" name="field" value="unprotect">
257    <input type="hidden" name="branch" value="{{.}}">
258    <button type="submit" class="danger">Unprotect</button>
259  </form></li>
260{{end}}
261</ul>
262{{else}}<p class="meta">No protected branches. A protected branch refuses deletion and force-pushes.</p>{{end}}
263<form method="post" action="{{$base}}" class="setform">
264  <input type="hidden" name="field" value="protect">
265  <div><label for="branch">Protect a branch</label></div>
266  <div><select id="branch" name="branch">{{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}}</select></div>
267  <div><button type="submit" class="btn">Protect</button></div>
268</form>
269<form method="post" action="{{$base}}" class="setform">
270  <input type="hidden" name="field" value="require-mr">
271  <div><label for="require-mr">Require merge requests</label><p class="hint">Every protected branch changes through a merge request. A direct push is refused in pre-receive.</p></div>
272  <div class="check"><input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}></div>
273  <div><button type="submit" class="btn">Save</button></div>
274</form>
275</section>
276
277<section id="tags"><h2>Protected tags</h2>
278{{if .Repo.Settings.ProtectedTags}}
279<ul class="protlist">
280{{range .Repo.Settings.ProtectedTags}}<li><code>{{.}}</code>
281  <form method="post" action="{{$base}}" class="inline">
282    <input type="hidden" name="field" value="unprotect-tag">
283    <input type="hidden" name="glob" value="{{.}}">
284    <button type="submit" class="danger">Unprotect</button>
285  </form></li>
286{{end}}
287</ul>
288{{else}}<p class="meta">No protected tags. A tag matching a protected glob is created once and refuses moves and deletion. A tag a release is anchored to refuses both regardless.</p>{{end}}
289<form method="post" action="{{$base}}" class="setform">
290  <input type="hidden" name="field" value="protect-tag">
291  <div><label for="glob">Protect tags matching</label></div>
292  <div><input type="text" id="glob" name="glob" placeholder="v*"></div>
293  <div><button type="submit" class="btn">Protect</button></div>
294</form>
295</section>
296
297<section id="deps"><h2>Dependencies</h2>
298<form method="post" action="{{$base}}" class="setform">
299  <input type="hidden" name="field" value="deps">
300  <div><label for="deps-enabled">Check for updates and advisories</label><p class="hint">Evaluates the manifests and lockfiles on <code>{{.Repo.DefaultBranch}}</code> against the registries and OSV, and opens an issue for each. Updates for Go, NPM, Crates, and PyPI; advisories for those and SwiftPM.</p></div>
301  <div class="check"><input type="checkbox" id="deps-enabled" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}></div>
302  <div><button type="submit" class="btn">Save</button></div>
303</form>
304{{if .DepsEnabled}}
305<p class="meta">Last checked {{if .Deps.LastCheck}}{{when .Deps.LastCheck}}{{else}}never{{end}}{{if .Deps.IssueNumber}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Deps.IssueNumber}}">#{{.Deps.IssueNumber}}</a>{{end}}{{if .Deps.AdvisoryIssueNumber}} · advisories <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Deps.AdvisoryIssueNumber}}">#{{.Deps.AdvisoryIssueNumber}}</a>{{end}}</p>
306{{if .Deps.LastError}}<p class="error" role="alert">{{.Deps.LastError}}</p>{{end}}
307{{if .Deps.Behind}}<div class="tablewrap"><table class="keys">
308<tr class="cols"><th scope="col">dependency</th><th scope="col">pinned</th><th scope="col">latest</th></tr>
309{{range .Deps.Behind}}<tr>
310  <td class="mono">{{.Ecosystem}} {{.Name}}</td>
311  <td class="mono">{{.Current}}</td>
312  <td class="mono">{{.Latest}}</td>
313</tr>
314{{end}}</table></div>
315{{else}}<p class="none">Nothing behind{{if not .Deps.LastCheck}} — the first check has not run yet{{end}}.</p>{{end}}
316{{if .Deps.Advisories}}<div class="tablewrap"><table class="keys">
317<tr class="cols"><th scope="col">dependency</th><th scope="col">version</th><th scope="col">advisory</th><th scope="col">fixed in</th><th scope="col"><span class="vh">dismiss</span></th></tr>
318{{range .Deps.Advisories}}<tr>
319  <td class="mono">{{.Ecosystem}} {{.Name}}</td>
320  <td class="mono">{{.Version}}</td>
321  <td class="mono"><a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a></td>
322  <td class="mono">{{.Fixed}}</td>
323  <td><form method="post" action="{{$base}}" class="inline">
324    <input type="hidden" name="field" value="deps-dismiss">
325    <input type="hidden" name="advisory" value="{{.ID}}">
326    <select name="reason" aria-label="Reason"><option value="not-affected">Not affected</option><option value="wont-fix">Won't fix</option><option value="dev-only">Development only</option></select>
327    <button type="submit">Dismiss</button>
328  </form></td>
329</tr>
330{{end}}</table></div>
331{{else if .Deps.LastCheck}}<p class="none">No open advisories.</p>{{end}}
332{{if .Deps.NotImported}}<p class="meta">Not imported by any Go file here, so not reported:{{range .Deps.NotImported}} <a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a> ({{.Name}}){{end}}. Imports through another module are not seen.</p>{{end}}
333{{if .Deps.Dismissed}}<h3>Dismissed advisories</h3><div class="tablewrap"><table class="keys">
334<tr class="cols"><th scope="col">dependency</th><th scope="col">advisory</th><th scope="col">reason</th><th scope="col"><span class="vh">reopen</span></th></tr>
335{{range .Deps.Dismissed}}<tr>
336  <td class="mono">{{.Ecosystem}} {{.Name}}</td>
337  <td class="mono"><a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a></td>
338  <td>{{.Reason}}{{if .By}} <span class="meta">by {{.By}}</span>{{end}}</td>
339  <td><form method="post" action="{{$base}}" class="inline">
340    <input type="hidden" name="field" value="deps-reopen">
341    <input type="hidden" name="advisory" value="{{.ID}}">
342    <button type="submit">Reopen</button>
343  </form></td>
344</tr>
345{{end}}</table></div>{{end}}
346{{end}}
347</section>
348
349<section id="runners"><h2>Runners</h2>
350{{if .Runners}}
351<ul class="protlist">
352{{range .Runners}}<li><code>{{.Fingerprint}}</code> <span class="meta">{{.Username}}{{if .LastSeen}}, last poll {{when .LastSeen}}{{else}}, never polled{{end}}{{if .BuildNumber}}, running {{.BuildRepo}} #{{.BuildNumber}} {{.BuildJob}}{{end}}{{if .Jobs}}, only {{join .Jobs ", "}}{{end}}</span>
353  <form method="post" action="{{$base}}" class="inline">
354    <input type="hidden" name="field" value="runner-remove">
355    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
356    <button type="submit" class="danger">Detach</button>
357  </form></li>
358{{end}}
359</ul>
360{{else}}<p class="meta">No runners attached. Builds for this repository run on the runners attached here; a repository with none queues builds nothing claims.</p>{{end}}
361<form method="post" action="{{$base}}" class="setform stack">
362  <input type="hidden" name="field" value="runner-add">
363  <label for="runner-key">Attach a runner</label>
364  <p class="hint">Install <code>gitbay-runner</code>, run <code>gitbay-runner init</code>, and paste the key it prints. The runner builds your commits with the repository's secrets; merge requests from forks wait unless it runs with <code>-untrusted</code>.</p>
365  <textarea id="runner-key" name="key" rows="3" spellcheck="false" placeholder="ssh-ed25519 AAAA… (from gitbay-runner init)">{{index .Submitted "key"}}</textarea>
366  <label for="runner-jobs">Jobs</label>
367  <p class="hint">Leave empty for every job. Name jobs, comma-separated, to have this runner claim only those here, for instance <code>gitbay-security</code> on a runner with the code scanning image.</p>
368  <input type="text" id="runner-jobs" name="jobs" value="{{index .Submitted "jobs"}}">
369  <button type="submit" class="btn">Attach</button>
370</form>
371</section>
372
373<section id="lifecycle"><h2>Lifecycle</h2>
374<form method="post" action="{{$base}}" class="setform">
375  <input type="hidden" name="field" value="archive">
376  <div><label for="archive">Archived</label><p class="hint">Read-only for everyone. Issues and requests close to new activity. Reversible.</p></div>
377  <div class="check"><input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}></div>
378  <div><button type="submit" {{if .Repo.Settings.Archived}}class="btn"{{else}}class="danger"{{end}}>Save</button></div>
379</form>
380<form method="post" action="{{$base}}" class="setform">
381  <input type="hidden" name="field" value="rename">
382  <div><label for="rename">Name</label><p class="hint">Clone URLs change. The old path stops resolving.</p></div>
383  <div><input type="text" id="rename" name="name" value="{{or (index .Submitted "name") .Repo.Name}}" autocomplete="off" spellcheck="false"></div>
384  <div><button type="submit" class="btn">Rename</button></div>
385</form>
386{{$path := printf "%s/%s" .Repo.OwnerName .Repo.Name}}
387<form method="post" action="{{$base}}" class="setform stack">
388  <input type="hidden" name="field" value="transfer">
389  <label for="new-owner">Transfer</label>
390  <p class="hint">Move it to your own account or an organization you administer. Clone URLs change.</p>
391  <input type="text" id="new-owner" name="new-owner" value="{{index .Submitted "new-owner"}}" placeholder="new owner" autocomplete="off" spellcheck="false">
392  <p>{{template "confirmfield" $path}} <button type="submit" class="danger">Transfer</button></p>
393</form>
394<form method="post" action="{{$base}}" class="setform stack">
395  <input type="hidden" name="field" value="delete">
396  <span class="fieldname">Delete</span>
397  <p class="hint">Removes the repository, its issues and merge requests. Cannot be undone.</p>
398  <p>{{template "confirmfield" $path}} <button type="submit" class="danger">Delete repository</button></p>
399</form>
400</section>
401</div>
402</div>
403{{end}}