1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{{define "content"}}
<h3>Import a repository</h3>
<p class="muted">Branches and tags are copied from GitHub, GitLab, Gitea, Forgejo, Codeberg or any https clone URL. Issues and pull requests stay where they are.</p>
<form method="post" action="/import" class="twocol">
<div>
<label>Clone URL <input name="source" type="url" required autofocus placeholder="https://github.com/owner/repo" value="{{.Data.Source}}"></label>
<label>Access token <span class="muted">(private sources only)</span><input name="token" type="password" autocomplete="off" placeholder="Personal access token with read access"><small>Used once for this import and never stored.</small></label>
{{with .Data.Orgs}}<label>Owner <select name="owner"><option value="{{$.User.Name}}">~{{$.User.Name}}</option>{{range .}}<option value="{{.Name}}"{{if eq .Name $.Data.Owner}} selected{{end}}>~{{.Name}}</option>{{end}}</select></label>{{end}}
<label>Repository name <input name="name" pattern="[a-z0-9][a-z0-9_.-]{0,38}" placeholder="Taken from the URL when left empty" value="{{.Data.Name}}"></label>
<label>Description <input name="description" maxlength="200" value="{{.Data.Description}}"></label>
<div class="actions"><button class="btn primary">Import repository ▸</button></div>
</div>
<div>
<span class="legend">Visibility</span>
<label class="radio"><input type="radio" name="visibility" value="public" checked> Public<small>Shown on your profile and listed in the public index</small></label>
<label class="radio"><input type="radio" name="visibility" value="unlisted"> Unlisted<small>Visible to anyone who knows the URL, but not shown on your profile</small></label>
<label class="radio"><input type="radio" name="visibility" value="private"> Private<small>Only visible to you</small></label>
</div>
</form>
{{end}}
|