internal/web/templates/settings.html

2867b44a48ea8afa6b7c21d5e1d69272a7b235fa
gitbay/internal/web/templates/settings.html history · blame · raw

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