2021-01-15 07:24:03 +08:00
|
|
|
{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}}
|
2014-08-24 20:59:47 +08:00
|
|
|
<div class="field">
|
2022-06-28 04:58:46 +08:00
|
|
|
<h4>{{.locale.Tr "repo.settings.event_desc"}}</h4>
|
2015-08-28 23:36:13 +08:00
|
|
|
<div class="grouped event type fields">
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio non-events checkbox">
|
2019-03-19 10:33:20 +08:00
|
|
|
<input class="hidden" name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_push_only" | Str2html}}</label>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio non-events checkbox">
|
|
|
|
<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_send_everything" | Str2html}}</label>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio events checkbox">
|
|
|
|
<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_choose" | Str2html}}</label>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-27 00:30:06 +08:00
|
|
|
</div>
|
2015-08-28 23:36:13 +08:00
|
|
|
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
|
2020-03-06 13:10:48 +08:00
|
|
|
<!-- Repository Events -->
|
|
|
|
<div class="fourteen wide column">
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_header_repository"}}</label>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
<!-- Create -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_create"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_create_desc"}}</span>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-16 22:01:55 +08:00
|
|
|
<!-- Delete -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="delete" type="checkbox" tabindex="0" {{if .Webhook.Delete}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_delete"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_delete_desc"}}</span>
|
2018-05-16 22:01:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Fork -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="fork" type="checkbox" tabindex="0" {{if .Webhook.Fork}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_fork"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_fork_desc"}}</span>
|
2018-05-16 22:01:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
<!-- Push -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_push"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_push_desc"}}</span>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-06 13:10:48 +08:00
|
|
|
<!-- Repository -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="repository" type="checkbox" tabindex="0" {{if .Webhook.Repository}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_repository"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_repository_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Release -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="release" type="checkbox" tabindex="0" {{if .Webhook.Release}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_release"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_release_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-30 16:42:47 +08:00
|
|
|
<!-- Package -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="package" type="checkbox" tabindex="0" {{if .Webhook.Package}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_package"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_package_desc"}}</span>
|
2022-03-30 16:42:47 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-06 13:10:48 +08:00
|
|
|
|
2022-09-05 03:54:23 +08:00
|
|
|
<!-- Wiki -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}>
|
2022-10-10 22:05:32 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_wiki"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_wiki_desc"}}</span>
|
2022-09-05 03:54:23 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-03-06 13:10:48 +08:00
|
|
|
<!-- Issue Events -->
|
|
|
|
<div class="fourteen wide column">
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_header_issue"}}</label>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
2018-05-16 22:01:55 +08:00
|
|
|
<!-- Issues -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issues" type="checkbox" tabindex="0" {{if .Webhook.Issues}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_issues"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_issues_desc"}}</span>
|
2018-05-16 22:01:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-06 13:10:48 +08:00
|
|
|
<!-- Issue Assign -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issue_assign" type="checkbox" tabindex="0" {{if .Webhook.IssueAssign}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_issue_assign"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_assign_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Issue Label -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issue_label" type="checkbox" tabindex="0" {{if .Webhook.IssueLabel}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_issue_label"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_label_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Issue Milestone -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issue_milestone" type="checkbox" tabindex="0" {{if .Webhook.IssueMilestone}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_issue_milestone"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_milestone_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-16 22:01:55 +08:00
|
|
|
<!-- Issue Comment -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issue_comment" type="checkbox" tabindex="0" {{if .Webhook.IssueComment}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_issue_comment"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_comment_desc"}}</span>
|
2018-05-16 22:01:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-06 13:10:48 +08:00
|
|
|
|
|
|
|
<!-- Pull Request Events -->
|
|
|
|
<div class="fourteen wide column">
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_header_pull_request"}}</label>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
2016-08-14 18:32:24 +08:00
|
|
|
<!-- Pull Request -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="pull_request" type="checkbox" tabindex="0" {{if .Webhook.PullRequest}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_desc"}}</span>
|
2016-08-14 18:32:24 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-06 13:10:48 +08:00
|
|
|
<!-- Pull Request Assign -->
|
2017-09-03 16:20:24 +08:00
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
2020-03-06 13:10:48 +08:00
|
|
|
<input class="hidden" name="pull_request_assign" type="checkbox" tabindex="0" {{if .Webhook.PullRequestAssign}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request_assign"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_assign_desc"}}</span>
|
2017-09-03 16:20:24 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-06 13:10:48 +08:00
|
|
|
<!-- Pull Request Label -->
|
2018-05-16 22:01:55 +08:00
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
2020-03-06 13:10:48 +08:00
|
|
|
<input class="hidden" name="pull_request_label" type="checkbox" tabindex="0" {{if .Webhook.PullRequestLabel}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request_label"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_label_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Pull Request Milestone -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="pull_request_milestone" type="checkbox" tabindex="0" {{if .Webhook.PullRequestMilestone}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request_milestone"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_milestone_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Pull Request Comment -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="pull_request_comment" type="checkbox" tabindex="0" {{if .Webhook.PullRequestComment}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request_comment"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_comment_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Pull Request Review -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="pull_request_review" type="checkbox" tabindex="0" {{if .Webhook.PullRequestReview}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request_review"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_review_desc"}}</span>
|
2020-03-06 13:10:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Pull Request Sync -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="pull_request_sync" type="checkbox" tabindex="0" {{if .Webhook.PullRequestSync}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.event_pull_request_sync"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_sync_desc"}}</span>
|
2018-05-16 22:01:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2014-08-24 20:59:47 +08:00
|
|
|
</div>
|
2015-08-28 23:36:13 +08:00
|
|
|
|
2019-09-09 13:48:21 +08:00
|
|
|
<!-- Branch filter -->
|
|
|
|
<div class="field">
|
2022-06-28 04:58:46 +08:00
|
|
|
<label for="branch_filter">{{.locale.Tr "repo.settings.branch_filter"}}</label>
|
2019-09-09 13:48:21 +08:00
|
|
|
<input name="branch_filter" type="text" tabindex="0" value="{{or .Webhook.BranchFilter "*"}}">
|
2022-06-28 04:58:46 +08:00
|
|
|
<span class="help">{{.locale.Tr "repo.settings.branch_filter_desc" | Str2html}}</span>
|
2019-09-09 13:48:21 +08:00
|
|
|
</div>
|
|
|
|
|
2015-08-28 23:36:13 +08:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
2015-08-27 00:30:06 +08:00
|
|
|
<div class="inline field">
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="ui checkbox">
|
2019-03-19 10:33:20 +08:00
|
|
|
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or $isNew .Webhook.IsActive}}checked{{end}}>
|
2022-06-28 04:58:46 +08:00
|
|
|
<label>{{.locale.Tr "repo.settings.active"}}</label>
|
|
|
|
<span class="help">{{.locale.Tr "repo.settings.active_helper"}}</span>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2014-08-24 20:59:47 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2019-03-19 10:33:20 +08:00
|
|
|
{{if $isNew}}
|
2022-06-28 04:58:46 +08:00
|
|
|
<button class="ui green button">{{.locale.Tr "repo.settings.add_webhook"}}</button>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{else}}
|
2022-06-28 04:58:46 +08:00
|
|
|
<button class="ui green button">{{.locale.Tr "repo.settings.update_webhook"}}</button>
|
|
|
|
<a class="ui red delete-button button" data-url="{{.BaseLink}}/delete" data-id="{{.Webhook.ID}}">{{.locale.Tr "repo.settings.delete_webhook"}}</a>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{end}}
|
2014-08-24 20:59:47 +08:00
|
|
|
</div>
|
2015-08-27 00:30:06 +08:00
|
|
|
|
2018-05-16 22:01:55 +08:00
|
|
|
{{template "repo/settings/webhook/delete_modal" .}}
|