internal/web/templates/settings.html

ac8d910ff31c2fadc452928e1d56c64b4af25495
gitbay/internal/web/templates/settings.html

546 lines · 37310 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<div class="pagehead">
  6  <h1>Settings</h1>
  7</div>
  8{{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}}
  9<div class="withcol narrow">
 10<nav class="sidecol sticky" aria-label="Sections" data-scrollspy="1">
 11<details class="sidedrop">
 12<summary><span class="sideword">Sections</span></summary>
 13  <div class="grp"><h2 class="colhead">Sections</h2>
 14  <ul>
 15    <li><a href="#identity">Identity</a></li>
 16    <li><a href="#access">Access</a></li>
 17    <li><a href="#webhooks">Webhooks</a></li>
 18    <li><a href="#gates">Merge gates</a></li>
 19    {{if or .ScanAvailable .Security.Enabled}}<li><a href="#security">Code scanning</a></li>{{end}}
 20    <li><a href="#secrets">Secret scan</a></li>
 21    <li><a href="#branches">Protected branches</a></li>
 22    <li><a href="#tags">Protected tags</a></li>
 23    <li><a href="#deps">Dependencies</a></li>
 24    <li><a href="#runners">Runners</a></li>
 25    <li><a href="#buildsecrets">Build secrets</a></li>
 26    <li><a href="#deploykeys">Deploy keys</a></li>
 27    <li><a href="#mirrors">Mirrors</a></li>
 28    <li><a href="#domains">Pages domains</a></li>
 29    <li><a href="#lifecycle">Lifecycle</a></li>
 30  </ul></div>
 31</details>
 32</nav>
 33<div class="colmain">
 34
 35<section id="identity" class="setcard"><h2>Identity</h2>
 36<form method="post" action="{{$base}}" class="setform">
 37  <input type="hidden" name="field" value="description">
 38  <div><label for="description">Description</label></div>
 39  <div><input type="text" id="description" name="description" value="{{or (index .Submitted "description") .Desc}}" placeholder="one line, shown in listings"></div>
 40  <div><button type="submit">Save</button></div>
 41</form>
 42<form method="post" action="{{$base}}" class="setform">
 43  <input type="hidden" name="field" value="website">
 44  <div><label for="website">Website</label></div>
 45  <div><input type="text" id="website" name="website" value="{{or (index .Submitted "website") .Repo.Settings.Website}}" placeholder="https://example.org"></div>
 46  <div><button type="submit" class="btn">Save</button></div>
 47</form>
 48<form method="post" action="{{$base}}" class="setform">
 49  <input type="hidden" name="field" value="topics">
 50  <div><label for="topics">Topics</label><p class="hint">Comma separated, lower case.</p></div>
 51  <div><input type="text" id="topics" name="topics" value="{{or (index .Submitted "topics") (join .Topics ", ")}}"></div>
 52  <div><button type="submit" class="btn">Save</button></div>
 53</form>
 54{{if .Branches}}<form method="post" action="{{$base}}" class="setform" data-autosave="1">
 55  <input type="hidden" name="field" value="default-branch">
 56  <div><label for="default-branch">Default branch</label></div>
 57  <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>
 58  <div><button type="submit" class="btn">Save</button></div>
 59</form>{{end}}
 60</section>
 61
 62<section id="access" class="setcard"><h2>Access</h2>
 63<form method="post" action="{{$base}}" class="setform">
 64  <input type="hidden" name="field" value="visibility">
 65  <div><span class="fieldname">Visibility</span></div>
 66  <div class="check">
 67    <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label>
 68    <label><input type="radio" name="visibility" value="private"{{if eq .Repo.Visibility "private"}} checked{{end}}> Private</label>
 69  </div>
 70  <div><button type="submit" class="btn">Save</button></div>
 71</form>
 72<form method="post" action="{{$base}}" class="setform">
 73  <input type="hidden" name="field" value="git-daemon">
 74  <div><label for="git-daemon">Serve over git://</label><p class="hint">Public repositories only.</p></div>
 75  <div class="check"><input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}></div>
 76  <div><button type="submit" class="btn">Save</button></div>
 77</form>
 78<h3>Who can reach this repository</h3>
 79{{if .Access}}<div class="tablewrap"><table class="keys">
 80<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>
 81<tbody>{{range .Access}}<tr>
 82  <td class="mono"><a href="/{{.User}}">{{.User}}</a></td>
 83  <td>{{.Role}}</td>
 84  <td>{{.Source}}</td>
 85  <td class="act">{{if eq .Source "direct"}}<form method="post" action="{{$base}}" class="inline">
 86    <input type="hidden" name="field" value="access-revoke">
 87    <input type="hidden" name="user" value="{{.User}}">
 88    <button type="submit" class="danger">Revoke</button>
 89  </form>{{end}}</td>
 90</tr>{{end}}</tbody></table></div>
 91{{else}}<p class="meta">Nobody else can reach it.</p>{{end}}
 92<form method="post" action="{{$base}}" class="setform">
 93  <input type="hidden" name="field" value="access-grant">
 94  <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>
 95  <div><input type="text" id="grant-user" name="user" value="{{index .Submitted "user"}}" autocomplete="off" spellcheck="false" placeholder="username">
 96  <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>
 97  <div><button type="submit" class="btn">Grant</button></div>
 98</form>
 99</section>
100
101<section id="webhooks" class="setcard"><h2>Webhooks</h2>
102{{if .Hooks}}
103<ul class="protlist">
104{{range .Hooks}}<li><span class="mono">#{{.ID}}</span> <code>{{.URL}}</code> <span class="meta">{{.Events}}{{if .Secret}}, signed{{end}}</span>
105  <form method="post" action="{{$base}}" class="inline">
106    <input type="hidden" name="field" value="webhook-remove">
107    <input type="hidden" name="id" value="{{.ID}}">
108    <button type="submit" class="danger">Remove</button>
109  </form></li>
110{{end}}
111</ul>
112{{else}}<p class="meta">No webhooks.</p>{{end}}
113<details class="editbox"{{if or (index .Submitted "url") (index .Submitted "events")}} open{{end}}>
114  <summary>Add a webhook</summary>
115  <form method="post" action="{{$base}}" class="setform stack" autocomplete="off">
116    <input type="hidden" name="field" value="webhook-add">
117    <label for="hook-url">Payload URL</label>
118    <input type="text" id="hook-url" name="url" value="{{index .Submitted "url"}}" placeholder="https://ci.example.org/hook" spellcheck="false">
119    <label for="hook-events">Events</label>
120    <p class="hint">Comma separated, or <code>*</code> for all.</p>
121    <input type="text" id="hook-events" name="events" value="{{or (index .Submitted "events") "*"}}" spellcheck="false">
122    <label for="hook-secret">Secret</label>
123    <p class="hint">Optional. Signs each delivery; it is not shown again.</p>
124    <input type="password" id="hook-secret" name="secret" value="" autocomplete="new-password">
125    <span class="btngroup"><button type="submit">Add webhook</button></span>
126  </form>
127</details>
128<h3>Recent deliveries</h3>
129{{if .Deliveries}}<div class="tablewrap"><table class="keys">
130<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>
131<tbody>{{range .Deliveries}}<tr>
132  <td class="mono">{{.ID}}</td>
133  <td>{{.Event}}</td>
134  <td class="mono">{{.URL}}</td>
135  <td>{{.Status}} ({{.Attempts}} attempts){{if .LastError}}<br><span class="meta">{{.LastError}}</span>{{end}}</td>
136  <td class="act"><form method="post" action="{{$base}}" class="inline">
137    <input type="hidden" name="field" value="webhook-redeliver">
138    <input type="hidden" name="delivery" value="{{.ID}}">
139    <button type="submit" class="btn">Redeliver</button>
140  </form></td>
141</tr>{{end}}</tbody></table></div>
142{{else}}<p class="meta">Nothing delivered yet.</p>{{end}}
143</section>
144
145<section id="gates" class="setcard"><h2>Merge gates</h2>
146<p class="meta">Checked before a merge, in this order: checks, approvals, resolved threads, signatures.</p>
147<form method="post" action="{{$base}}" class="setform">
148  <input type="hidden" name="field" value="require-checks">
149  <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>
150  <div class="check"><input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}></div>
151  <div><button type="submit" class="btn">Save</button></div>
152</form>
153<form method="post" action="{{$base}}" class="setform">
154  <input type="hidden" name="field" value="require-contexts">
155  <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>
156  <div><input type="text" id="contexts" name="contexts" value="{{range $i, $c := .Repo.Settings.RequiredContexts}}{{if $i}} {{end}}{{$c}}{{end}}" autocomplete="off"></div>
157  <div><button type="submit" class="btn">Save</button></div>
158</form>
159<form method="post" action="{{$base}}" class="setform">
160  <input type="hidden" name="field" value="require-approvals">
161  <div><label for="approvals">Approvals</label><p class="hint">Approvals from anyone with write access. Zero means none required.</p></div>
162  <div class="num"><input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"></div>
163  <div><button type="submit" class="btn">Save</button></div>
164</form>
165<form method="post" action="{{$base}}" class="setform">
166  <input type="hidden" name="field" value="require-resolved">
167  <div><label for="require-resolved">Review threads</label><p class="hint">Every thread on the diff must be resolved before merging.</p></div>
168  <div class="check"><input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}></div>
169  <div><button type="submit" class="btn">Save</button></div>
170</form>
171<form method="post" action="{{$base}}" class="setform">
172  <input type="hidden" name="field" value="require-codeowners">
173  <div><label for="require-codeowners">CODEOWNERS</label><p class="hint">Code owners must approve.</p></div>
174  <div class="check"><input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}></div>
175  <div><button type="submit" class="btn">Save</button></div>
176</form>
177<form method="post" action="{{$base}}" class="setform">
178  <input type="hidden" name="field" value="require-signed">
179  <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>
180  <div class="check"><input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}></div>
181  <div><button type="submit" class="btn">Save</button></div>
182</form>
183</section>
184
185{{if or .ScanAvailable .Security.Enabled}}<section id="security" class="setcard"><h2>Code scanning</h2>
186<form method="post" action="{{$base}}" class="setform" data-autosave="1">
187  <input type="hidden" name="field" value="security">
188  <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>
189  <div class="check"><input type="checkbox" id="security-enabled" name="security" value="on"{{if .Security.Enabled}} checked{{end}}></div>
190  <div><button type="submit" class="btn">Save</button></div>
191</form>
192{{if .ScanAvailable}}<form method="post" action="{{$base}}" class="setform" data-autosave="1">
193  <input type="hidden" name="field" value="security-frequency">
194  <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>
195  <div><select id="security-frequency" name="security-frequency">{{$freq := .ScanFrequency}}{{range .ScanFrequencies}}<option value="{{.}}"{{if eq . $freq}} selected{{end}}>{{.}}</option>{{end}}</select></div>
196  <div><button type="submit" class="btn">Save</button></div>
197</form>{{end}}
198{{if .Security.Enabled}}
199<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>
200{{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}}{{if .Unsplit}} {{.Unsplit}} unquoted-expansion hits on expansions the shell does not split.{{end}}{{if .Joined}} {{.Joined}} string-concat-in-list hits on strings joined inside a call, not as a list element.{{end}}{{if .NoReturn}} {{.NoReturn}} return hits on lines with no return statement.{{end}}{{if .Attributes}} {{.Attributes}} is-function-without-parentheses hits on names the repository defines as attributes.{{end}}{{if .InTests}} {{.InTests}} insecure-random hits in tests.{{end}}</p>{{end}}{{end}}
201{{if .Security.Findings}}<div class="tablewrap"><table class="keys">
202<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>
203{{range .Security.Findings}}<tr>
204  <td class="mono"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/blob/{{$.Repo.DefaultBranch}}/{{.Path}}#L{{.Line}}">{{.Path}}:{{.Line}}</a></td>
205  <td class="mono">{{.Rule}}</td>
206  <td>{{.Level}}</td>
207  <td><form method="post" action="{{$base}}" class="inline">
208    <input type="hidden" name="field" value="security-dismiss">
209    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
210    <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>
211    <button type="submit">Dismiss</button>
212  </form></td>
213</tr>
214{{end}}</table></div>
215{{else if .Security.LastResults}}<p class="none">The last scan found nothing open.</p>{{end}}
216{{if .Security.Dismissed}}<details class="editbox"><summary>Dismissed ({{len .Security.Dismissed}})</summary>
217<p><input type="search" class="tablefilter" placeholder="Filter dismissed findings…" aria-label="Filter dismissed findings" data-filter-table="sec-dismissed"></p>
218<div class="tablewrap"><table class="keys" id="sec-dismissed">
219<thead><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></thead>
220<tbody>{{range .Security.Dismissed}}<tr>
221  <td class="mono"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/blob/{{$.Repo.DefaultBranch}}/{{.Path}}#L{{.Line}}">{{.Path}}:{{.Line}}</a></td>
222  <td class="mono">{{.Rule}}</td>
223  <td>{{.Reason}}{{if .DismissedBy}} <span class="meta">by {{.DismissedBy}}</span>{{end}}</td>
224  <td><form method="post" action="{{$base}}" class="inline">
225    <input type="hidden" name="field" value="security-reopen">
226    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
227    <button type="submit">Reopen</button>
228  </form></td>
229</tr>
230{{end}}</tbody></table></div></details>{{end}}
231{{end}}
232<form method="post" action="{{$base}}" class="setform">
233  <input type="hidden" name="field" value="security-ignore">
234  <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>
235  <div><input type="text" id="security-ignore" name="security-ignore" value="{{join .Repo.Settings.SecurityIgnore " "}}"></div>
236  <div><button type="submit" class="btn">Save</button></div>
237</form>
238<form method="post" action="{{$base}}" class="setform">
239  <input type="hidden" name="field" value="security-exclude-rule">
240  <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>
241  <div><input type="text" id="security-exclude-rule" name="security-exclude-rule" value="{{join .Repo.Settings.SecurityExcludeRules " "}}"></div>
242  <div><button type="submit" class="btn">Save</button></div>
243</form>
244</section>
245{{end}}
246
247<section id="secrets" class="setcard"><h2>Secret scan</h2>
248<form method="post" action="{{$base}}" class="setform">
249  <input type="hidden" name="field" value="secret-scan">
250  <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>
251  <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>
252  <div><button type="submit" class="btn">Save</button></div>
253</form>
254<form method="post" action="{{$base}}" class="setform">
255  <input type="hidden" name="field" value="secret-scan-allow">
256  <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>
257  <div><input type="text" id="secret-scan-allow" name="secret-scan-allow" value="{{join .Repo.Settings.SecretScanAllow " "}}"></div>
258  <div><button type="submit" class="btn">Save</button></div>
259</form>
260</section>
261
262<section id="branches" class="setcard"><h2>Protected branches</h2>
263{{if .Repo.Settings.ProtectedBranches}}
264<ul class="protlist">
265{{$mr := .Repo.Settings.RequireMR}}{{range .Repo.Settings.ProtectedBranches}}<li><code>{{.}}</code>{{if $mr}} <span class="hint">Direct pushes refused, merge requests only.</span>{{end}}
266  <form method="post" action="{{$base}}" class="inline">
267    <input type="hidden" name="field" value="unprotect">
268    <input type="hidden" name="branch" value="{{.}}">
269    <button type="submit" class="danger">Unprotect</button>
270  </form></li>
271{{end}}
272</ul>
273{{else}}<p class="meta">No protected branches. A protected branch refuses deletion and force-pushes.</p>{{end}}
274<form method="post" action="{{$base}}" class="setform">
275  <input type="hidden" name="field" value="protect">
276  <div><label for="branch">Protect a branch</label></div>
277  <div><select id="branch" name="branch">{{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}}</select></div>
278  <div><button type="submit" class="btn">Protect</button></div>
279</form>
280<form method="post" action="{{$base}}" class="setform">
281  <input type="hidden" name="field" value="require-mr">
282  <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>
283  <div class="check"><input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}></div>
284  <div><button type="submit" class="btn">Save</button></div>
285</form>
286</section>
287
288<section id="tags" class="setcard"><h2>Protected tags</h2>
289{{if .Repo.Settings.ProtectedTags}}
290<ul class="protlist">
291{{range .Repo.Settings.ProtectedTags}}<li><code>{{.}}</code>
292  <form method="post" action="{{$base}}" class="inline">
293    <input type="hidden" name="field" value="unprotect-tag">
294    <input type="hidden" name="glob" value="{{.}}">
295    <button type="submit" class="danger">Unprotect</button>
296  </form></li>
297{{end}}
298</ul>
299{{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}}
300<form method="post" action="{{$base}}" class="setform">
301  <input type="hidden" name="field" value="protect-tag">
302  <div><label for="glob">Protect tags matching</label></div>
303  <div><input type="text" id="glob" name="glob" placeholder="v*"></div>
304  <div><button type="submit" class="btn">Protect</button></div>
305</form>
306</section>
307
308<section id="deps" class="setcard"><h2>Dependencies</h2>
309<form method="post" action="{{$base}}" class="setform" data-autosave="1">
310  <input type="hidden" name="field" value="deps">
311  <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>
312  <div class="check"><input type="checkbox" id="deps-enabled" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}></div>
313  <div><button type="submit" class="btn">Save</button></div>
314</form>
315{{if .DepsEnabled}}
316<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>
317{{if .Deps.LastError}}<p class="error" role="alert">{{.Deps.LastError}}</p>{{end}}
318{{if .Deps.Behind}}<div class="tablewrap"><table class="keys">
319<tr class="cols"><th scope="col">dependency</th><th scope="col">pinned</th><th scope="col">latest</th></tr>
320{{range .Deps.Behind}}<tr>
321  <td class="mono">{{.Ecosystem}} {{.Name}}</td>
322  <td class="mono">{{.Current}}</td>
323  <td class="mono">{{.Latest}}</td>
324</tr>
325{{end}}</table></div>
326{{else}}<p class="none">Nothing behind{{if not .Deps.LastCheck}} — the first check has not run yet{{end}}.</p>{{end}}
327{{if .Deps.Advisories}}<div class="tablewrap"><table class="keys">
328<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>
329{{range .Deps.Advisories}}<tr>
330  <td class="mono">{{.Ecosystem}} {{.Name}}</td>
331  <td class="mono">{{.Version}}</td>
332  <td class="mono"><a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a></td>
333  <td class="mono">{{.Fixed}}</td>
334  <td><form method="post" action="{{$base}}" class="inline">
335    <input type="hidden" name="field" value="deps-dismiss">
336    <input type="hidden" name="advisory" value="{{.ID}}">
337    <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>
338    <button type="submit">Dismiss</button>
339  </form></td>
340</tr>
341{{end}}</table></div>
342{{else if .Deps.LastCheck}}<p class="none">No open advisories.</p>{{end}}
343{{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}}
344{{if .Deps.Dismissed}}<details class="editbox"><summary>Dismissed advisories ({{len .Deps.Dismissed}})</summary>
345<p><input type="search" class="tablefilter" placeholder="Filter dismissed advisories…" aria-label="Filter dismissed advisories" data-filter-table="deps-dismissed"></p>
346<div class="tablewrap"><table class="keys" id="deps-dismissed">
347<thead><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></thead>
348<tbody>{{range .Deps.Dismissed}}<tr>
349  <td class="mono">{{.Ecosystem}} {{.Name}}</td>
350  <td class="mono"><a href="https://osv.dev/vulnerability/{{.ID}}">{{.ID}}</a></td>
351  <td>{{.Reason}}{{if .By}} <span class="meta">by {{.By}}</span>{{end}}</td>
352  <td><form method="post" action="{{$base}}" class="inline">
353    <input type="hidden" name="field" value="deps-reopen">
354    <input type="hidden" name="advisory" value="{{.ID}}">
355    <button type="submit">Reopen</button>
356  </form></td>
357</tr>
358{{end}}</tbody></table></div></details>{{end}}
359{{end}}
360</section>
361
362<section id="runners" class="setcard"><h2>Runners</h2>
363{{if .Runners}}
364<ul class="protlist">
365{{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>
366  <form method="post" action="{{$base}}" class="inline">
367    <input type="hidden" name="field" value="runner-remove">
368    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
369    <button type="submit" class="danger">Detach</button>
370  </form></li>
371{{end}}
372</ul>
373{{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}}
374<details class="editbox"{{if or (index .Submitted "key") (index .Submitted "jobs")}} open{{end}}>
375  <summary>Attach a runner</summary>
376  <form method="post" action="{{$base}}" class="setform stack">
377    <input type="hidden" name="field" value="runner-add">
378    <label for="runner-key">Runner public key</label>
379    <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>
380    <textarea id="runner-key" name="key" rows="3" spellcheck="false" placeholder="ssh-ed25519 AAAA… (from gitbay-runner init)">{{index .Submitted "key"}}</textarea>
381    <label for="runner-jobs">Jobs</label>
382    <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>
383    <input type="text" id="runner-jobs" name="jobs" value="{{index .Submitted "jobs"}}">
384    <span class="btngroup"><button type="submit">Attach runner</button></span>
385  </form>
386</details>
387</section>
388
389<section id="buildsecrets" class="setcard"><h2>Build secrets</h2>
390<p class="meta">Injected into CI job environments on trusted branches. Values are write-only and never shown again.</p>
391{{if .Secrets}}
392<ul class="protlist">
393{{range .Secrets}}<li><code>{{.}}</code>
394  <form method="post" action="{{$base}}" class="inline">
395    <input type="hidden" name="field" value="secret-remove">
396    <input type="hidden" name="secret-name" value="{{.}}">
397    <button type="submit" class="danger">Remove</button>
398  </form></li>
399{{end}}
400</ul>
401{{else}}<p class="meta">No build secrets.</p>{{end}}
402<details class="editbox"{{if index .Submitted "secret-name"}} open{{end}}>
403  <summary>Set a build secret</summary>
404  <form method="post" action="{{$base}}" class="setform stack" autocomplete="off">
405    <input type="hidden" name="field" value="secret-set">
406    <label for="secret-name">Name</label>
407    <input type="text" id="secret-name" name="secret-name" value="{{index .Submitted "secret-name"}}" placeholder="DEPLOY_TOKEN" spellcheck="false" required>
408    <label for="secret-value">Value</label>
409    <input type="password" id="secret-value" name="secret-value" value="" autocomplete="new-password" required>
410    <span class="btngroup"><button type="submit">Save secret</button></span>
411  </form>
412</details>
413</section>
414
415<section id="deploykeys" class="setcard"><h2>Deploy keys</h2>
416<p class="meta">SSH keys bound to this repository only, for automated fetches or pushes.</p>
417{{if .DeployKeys}}<div class="tablewrap"><table class="keys nowrap">
418<thead><tr class="cols"><th scope="col">label</th><th scope="col">fingerprint</th><th scope="col">mode</th><th scope="col">last used</th><th scope="col">expires</th><th scope="col"><span class="vh">actions</span></th></tr></thead>
419<tbody>{{range .DeployKeys}}<tr>
420  <td>{{.Label}}</td>
421  <td class="mono">{{.Fingerprint}}</td>
422  <td><span class="chip">{{.Mode}}</span></td>
423  <td>{{if .LastUsedAt}}{{when .LastUsedAt}}{{else}}never{{end}}</td>
424  <td>{{if .ExpiresAt}}{{when .ExpiresAt}}{{else}}never{{end}}</td>
425  <td class="act"><form method="post" action="{{$base}}" class="inline">
426    <input type="hidden" name="field" value="deploykey-remove">
427    <input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
428    <button type="submit" class="danger">Remove</button>
429  </form></td>
430</tr>{{end}}</tbody></table></div>
431{{else}}<p class="meta">No deploy keys.</p>{{end}}
432<details class="editbox"{{if index .Submitted "deploy-key"}} open{{end}}>
433  <summary>Add a deploy key</summary>
434  <form method="post" action="{{$base}}" class="setform stack">
435    <input type="hidden" name="field" value="deploykey-add">
436    <label for="deploy-key">Public key</label>
437    <textarea id="deploy-key" name="deploy-key" rows="3" spellcheck="false" placeholder="ssh-ed25519 AAAA… deploy@host" required>{{index .Submitted "deploy-key"}}</textarea>
438    <label for="deploy-ttl">Expires after</label>
439    <input type="text" id="deploy-ttl" name="ttl" placeholder="e.g. 30d or 720h; empty never expires" autocomplete="off">
440    <label class="check"><input type="checkbox" name="rw" value="on"> Allow push access (<code>--rw</code>)</label>
441    <span class="btngroup"><button type="submit">Add deploy key</button></span>
442  </form>
443</details>
444</section>
445
446<section id="mirrors" class="setcard"><h2>Mirrors</h2>
447<p class="meta">Push commits to an upstream HTTPS remote or pull refs from one.</p>
448{{if .Mirrors}}<div class="tablewrap"><table class="keys">
449<thead><tr class="cols"><th scope="col">id</th><th scope="col">direction</th><th scope="col">url</th><th scope="col">status</th><th scope="col"><span class="vh">actions</span></th></tr></thead>
450<tbody>{{range .Mirrors}}<tr>
451  <td class="mono">#{{.ID}}</td>
452  <td><span class="chip">{{.Direction}}</span></td>
453  <td class="mono">{{.URL}}</td>
454  <td>{{if .LastError}}<span class="check-failure">{{.LastError}}</span>{{else if .Pending}}pending sync{{else if .LastSync}}synced {{when .LastSync}}{{else}}never synced{{end}}</td>
455  <td class="act"><form method="post" action="{{$base}}" class="inline">
456    <input type="hidden" name="field" value="mirror-remove">
457    <input type="hidden" name="id" value="{{.ID}}">
458    <button type="submit" class="danger">Remove</button>
459  </form></td>
460</tr>{{end}}</tbody></table></div>
461<form method="post" action="{{$base}}" class="actions">
462  <input type="hidden" name="field" value="mirror-sync">
463  <button type="submit" class="btn">Sync mirrors now</button>
464</form>
465{{else}}<p class="meta">No mirrors configured.</p>{{end}}
466<details class="editbox"{{if index .Submitted "mirror-url"}} open{{end}}>
467  <summary>Add a mirror</summary>
468  <form method="post" action="{{$base}}" class="setform stack" autocomplete="off">
469    <input type="hidden" name="field" value="mirror-add">
470    <label for="mirror-url">Remote HTTPS URL</label>
471    <input type="text" id="mirror-url" name="mirror-url" value="{{index .Submitted "mirror-url"}}" placeholder="https://example.org/owner/repo.git" spellcheck="false" required>
472    <label for="mirror-dir">Direction</label>
473    <select id="mirror-dir" name="direction">
474      <option value="push">push: replicate local refs to remote</option>
475      <option value="pull">pull: track upstream refs (refuses local pushes)</option>
476    </select>
477    <label for="mirror-user">Remote username (optional)</label>
478    <input type="text" id="mirror-user" name="mirror-user" value="{{index .Submitted "mirror-user"}}" autocomplete="off" spellcheck="false">
479    <label for="mirror-token">Credential token (optional)</label>
480    <p class="hint">Sent once over stdin and stored encrypted; never shown again.</p>
481    <input type="password" id="mirror-token" name="mirror-token" value="" autocomplete="new-password">
482    <span class="btngroup"><button type="submit">Add mirror</button></span>
483  </form>
484</details>
485</section>
486
487<section id="domains" class="setcard"><h2>Pages domains</h2>
488<p class="meta">Custom hostnames serving this repository's pages branch once verified by DNS TXT record.</p>
489{{if .Domains}}<div class="tablewrap"><table class="keys">
490<thead><tr class="cols"><th scope="col">domain</th><th scope="col">state</th><th scope="col"><span class="vh">actions</span></th></tr></thead>
491<tbody>{{range .Domains}}<tr>
492  <td class="mono">{{.Domain}}</td>
493  <td><span class="chip {{if eq .State "verified"}}chip-open{{else if eq .State "expired"}}chip-closed{{else}}chip-stale{{end}}">{{.State}}</span></td>
494  <td class="act">
495    {{if ne .State "verified"}}<form method="post" action="{{$base}}" class="inline">
496      <input type="hidden" name="field" value="domain-verify">
497      <input type="hidden" name="domain" value="{{.Domain}}">
498      <button type="submit" class="btn">Verify DNS</button>
499    </form> {{end}}
500    <form method="post" action="{{$base}}" class="inline">
501      <input type="hidden" name="field" value="domain-remove">
502      <input type="hidden" name="domain" value="{{.Domain}}">
503      <button type="submit" class="danger">Remove</button>
504    </form>
505  </td>
506</tr>{{end}}</tbody></table></div>
507{{else}}<p class="meta">No custom pages domains.</p>{{end}}
508<form method="post" action="{{$base}}" class="setform">
509  <input type="hidden" name="field" value="domain-add">
510  <div><label for="pages-domain">Claim a domain</label><p class="hint">Public repositories only.</p></div>
511  <div><input type="text" id="pages-domain" name="domain" value="{{index .Submitted "domain"}}" placeholder="docs.example.org" spellcheck="false"></div>
512  <div><button type="submit" class="btn">Claim</button></div>
513</form>
514</section>
515
516<section id="lifecycle" class="setcard setcard-danger"><h2>Lifecycle</h2>
517<form method="post" action="{{$base}}" class="setform">
518  <input type="hidden" name="field" value="archive">
519  <div><label for="archive">Archived</label><p class="hint">Read-only for everyone. Issues and requests close to new activity. Reversible.</p></div>
520  <div class="check"><input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}></div>
521  <div><button type="submit" {{if .Repo.Settings.Archived}}class="btn"{{else}}class="danger"{{end}}>Save</button></div>
522</form>
523<form method="post" action="{{$base}}" class="setform">
524  <input type="hidden" name="field" value="rename">
525  <div><label for="rename">Name</label><p class="hint">Clone URLs change. The old path stops resolving.</p></div>
526  <div><input type="text" id="rename" name="name" value="{{or (index .Submitted "name") .Repo.Name}}" autocomplete="off" spellcheck="false"></div>
527  <div><button type="submit" class="btn">Rename</button></div>
528</form>
529{{$path := printf "%s/%s" .Repo.OwnerName .Repo.Name}}
530<form method="post" action="{{$base}}" class="setform stack">
531  <input type="hidden" name="field" value="transfer">
532  <label for="new-owner">Transfer</label>
533  <p class="hint">Move it to your own account or an organization you administer. Clone URLs change.</p>
534  <input type="text" id="new-owner" name="new-owner" value="{{index .Submitted "new-owner"}}" placeholder="new owner" autocomplete="off" spellcheck="false">
535  <p>{{template "confirmfield" $path}} <button type="submit" class="danger">Transfer</button></p>
536</form>
537<form method="post" action="{{$base}}" class="setform stack">
538  <input type="hidden" name="field" value="delete">
539  <span class="fieldname">Delete</span>
540  <p class="hint">Removes the repository, its issues and merge requests. Cannot be undone.</p>
541  <p>{{template "confirmfield" $path}} <button type="submit" class="danger">Delete repository</button></p>
542</form>
543</section>
544</div>
545</div>
546{{end}}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form