internal/web/templates/settings.html

332a13feaa444362bb4cc872ca95c62ccafcb64c
gitbay/internal/web/templates/settings.html history · blame · raw

121 lines · 5973 bytes

  1{{define "title"}}settings · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
  2{{define "content"}}
  3{{$base := printf "/%s/%s/settings" .Repo.OwnerName .Repo.Name}}
  4<h1>Settings</h1>
  5{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
  6
  7<h2>Identity</h2>
  8<form method="post" action="{{$base}}" class="setform">
  9  <input type="hidden" name="field" value="description">
 10  <label for="description">Description</label>
 11  <input type="text" id="description" name="description" value="{{.Desc}}" placeholder="one line, shown in listings">
 12  <button type="submit">Save</button>
 13</form>
 14<form method="post" action="{{$base}}" class="setform">
 15  <input type="hidden" name="field" value="website">
 16  <label for="website">Website</label>
 17  <input type="text" id="website" name="website" value="{{.Repo.Settings.Website}}" placeholder="https://example.org">
 18  <button type="submit">Save</button>
 19</form>
 20<form method="post" action="{{$base}}" class="setform">
 21  <input type="hidden" name="field" value="topics">
 22  <label for="topics-add">Topics</label>
 23  <input type="text" id="topics-add" name="add" placeholder="add, space-separated">
 24  <input type="text" name="remove" placeholder="remove">
 25  <button type="submit">Apply</button>
 26</form>
 27{{if .Topics}}<p class="meta">{{range .Topics}}<span class="chip topic">{{.}}</span> {{end}}</p>{{end}}
 28
 29<h2>Access</h2>
 30<form method="post" action="{{$base}}" class="setform">
 31  <input type="hidden" name="field" value="visibility">
 32  <label for="visibility">Visibility</label>
 33  <select id="visibility" name="visibility">
 34    <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option>
 35    <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option>
 36  </select>
 37  <button type="submit">Save</button>
 38</form>
 39<form method="post" action="{{$base}}" class="setform">
 40  <input type="hidden" name="field" value="git-daemon">
 41  <label for="git-daemon">Serve over git://</label>
 42  <input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}>
 43  <button type="submit">Save</button>
 44</form>
 45
 46<h2>Merge gates</h2>
 47<p class="meta">Checked before a merge, in this order: checks, approvals, resolved threads, signatures.</p>
 48<form method="post" action="{{$base}}" class="setform">
 49  <input type="hidden" name="field" value="require-checks">
 50  <label for="require-checks">Require green checks</label>
 51  <input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}>
 52  <button type="submit">Save</button>
 53</form>
 54<form method="post" action="{{$base}}" class="setform">
 55  <input type="hidden" name="field" value="require-approvals">
 56  <label for="approvals">Required approvals</label>
 57  <input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}">
 58  <button type="submit">Save</button>
 59</form>
 60<form method="post" action="{{$base}}" class="setform">
 61  <input type="hidden" name="field" value="require-resolved">
 62  <label for="require-resolved">Require resolved threads</label>
 63  <input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}>
 64  <button type="submit">Save</button>
 65</form>
 66<form method="post" action="{{$base}}" class="setform">
 67  <input type="hidden" name="field" value="require-codeowners">
 68  <label for="require-codeowners">Require CODEOWNERS approval</label>
 69  <input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}>
 70  <button type="submit">Save</button>
 71</form>
 72<form method="post" action="{{$base}}" class="setform">
 73  <input type="hidden" name="field" value="require-signed">
 74  <label for="require-signed">Require signed commits</label>
 75  <input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}>
 76  <button type="submit">Save</button>
 77</form>
 78
 79<h2>Protected branches</h2>
 80{{if .Repo.Settings.ProtectedBranches}}
 81<ul class="protlist">
 82{{range .Repo.Settings.ProtectedBranches}}<li><code>{{.}}</code>
 83  <form method="post" action="{{$base}}" class="inline">
 84    <input type="hidden" name="field" value="unprotect">
 85    <input type="hidden" name="branch" value="{{.}}">
 86    <button type="submit" class="linklike">Unprotect</button>
 87  </form></li>
 88{{end}}
 89</ul>
 90{{else}}<p class="meta">No protected branches. A protected branch refuses deletion and force-pushes.</p>{{end}}
 91<form method="post" action="{{$base}}" class="setform">
 92  <input type="hidden" name="field" value="protect">
 93  <label for="branch">Protect a branch</label>
 94  <select id="branch" name="branch">
 95    {{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}}
 96  </select>
 97  <button type="submit">Protect</button>
 98</form>
 99
100<h2>Dependencies</h2>
101<form method="post" action="{{$base}}" class="setform">
102  <input type="hidden" name="field" value="deps">
103  <label for="deps">Check for updates</label>
104  <input type="checkbox" id="deps" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}>
105  <button type="submit">Save</button>
106</form>
107<p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against
108proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind
109in an issue. Checking a private repository tells those registries what it
110depends on.</p>
111
112<h2>Lifecycle</h2>
113<form method="post" action="{{$base}}" class="setform">
114  <input type="hidden" name="field" value="archive">
115  <label for="archive">Archived (read-only)</label>
116  <input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}>
117  <button type="submit">Save</button>
118</form>
119<p class="meta">Deleting or transferring a repository is a CLI operation:
120<code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p>
121{{end}}