2024-03-13 16:49:48 +01:00
|
|
|
<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://sourcehut.org/" (ctx.Locale.Tr "repo.settings.web_hook_name_sourcehut_builds")}}</p>
|
|
|
|
<form class="ui form" action="{{.BaseLink}}/{{or .Webhook.ID "sourcehut_builds/new"}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
2024-04-08 17:50:36 +02:00
|
|
|
<label for="payload_url">{{ctx.Locale.Tr "repo.settings.graphql_url"}}</label>
|
|
|
|
<input id="payload_url" name="payload_url" type="url" value="{{or .Webhook.URL "https://builds.sr.ht/query"}}" autofocus required>
|
2024-03-13 16:49:48 +01:00
|
|
|
</div>
|
|
|
|
<div class="required field {{if .Err_ManifestPath}}error{{end}}">
|
|
|
|
<label for="manifest_path">{{ctx.Locale.Tr "repo.settings.sourcehut_builds.manifest_path"}}</label>
|
2024-04-08 17:50:36 +02:00
|
|
|
<input id="manifest_path" name="manifest_path" type="text" value="{{or .HookMetadata.ManifestPath ".build.yml"}}" required>
|
2024-03-13 16:49:48 +01:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.sourcehut_builds.visibility"}}</label>
|
|
|
|
<div class="ui selection dropdown">
|
|
|
|
<input type="hidden" id="visibility" name="visibility" value="{{if .HookMetadata.Visibility}}{{.HookMetadata.Visibility}}{{else}}PRIVATE{{end}}">
|
|
|
|
<div class="default text"></div>
|
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
|
|
<div class="menu">
|
|
|
|
<div class="item" data-value="PUBLIC">PUBLIC</div>
|
|
|
|
<div class="item" data-value="UNLISTED">UNLISTED</div>
|
|
|
|
<div class="item" data-value="PRIVATE">PRIVATE</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="secrets" type="checkbox" {{if .HookMetadata.Secrets}}checked{{end}}>
|
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.sourcehut_builds.secrets"}}</label>
|
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.settings.sourcehut_builds.secrets_helper"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-08 17:03:08 +02:00
|
|
|
{{template "webhook/shared-settings" .}}
|
2024-03-13 16:49:48 +01:00
|
|
|
</form>
|