diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-03-05 23:10:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-06 07:10:48 +0200 |
commit | 3f1c0841cb9fc61136b85c6b39613679d2851707 (patch) | |
tree | d0b15f3b809891d83f41fed5ab7378765330525a /templates/repo | |
parent | 80db44267ccb688c596e8375523af5cd92864d87 (diff) | |
download | gitea-3f1c0841cb9fc61136b85c6b39613679d2851707.tar.gz gitea-3f1c0841cb9fc61136b85c6b39613679d2851707.zip |
Granular webhook events (#9626)
* Initial work
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add PR reviews and API coverage
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Split up events
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add migration and locale
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Format
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Revert IsPull
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix comments
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix tests
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix PR reviews
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix issue_comment
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Make fmt
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Migrations
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Backwards compatible API
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix feishu
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move session commit
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/settings/webhook/settings.tmpl | 120 |
1 files changed, 112 insertions, 8 deletions
diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl index a033ac14bb..de74dab05d 100644 --- a/templates/repo/settings/webhook/settings.tmpl +++ b/templates/repo/settings/webhook/settings.tmpl @@ -23,6 +23,10 @@ </div> <div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}> + <!-- Repository Events --> + <div class="fourteen wide column"> + <label>{{.i18n.Tr "repo.settings.event_header_repository"}}</label> + </div> <!-- Create --> <div class="seven wide column"> <div class="field"> @@ -63,6 +67,31 @@ </div> </div> </div> + <!-- 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}}> + <label>{{.i18n.Tr "repo.settings.event_repository"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_repository_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_release"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_release_desc"}}</span> + </div> + </div> + </div> + + <!-- Issue Events --> + <div class="fourteen wide column"> + <label>{{.i18n.Tr "repo.settings.event_header_issue"}}</label> + </div> <!-- Issues --> <div class="seven wide column"> <div class="field"> @@ -73,6 +102,36 @@ </div> </div> </div> + <!-- 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}}> + <label>{{.i18n.Tr "repo.settings.event_issue_assign"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_issue_assign_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_issue_label"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_issue_label_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_issue_milestone"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_issue_milestone_desc"}}</span> + </div> + </div> + </div> <!-- Issue Comment --> <div class="seven wide column"> <div class="field"> @@ -83,6 +142,11 @@ </div> </div> </div> + + <!-- Pull Request Events --> + <div class="fourteen wide column"> + <label>{{.i18n.Tr "repo.settings.event_header_pull_request"}}</label> + </div> <!-- Pull Request --> <div class="seven wide column"> <div class="field"> @@ -93,23 +157,63 @@ </div> </div> </div> - <!-- Repository --> + <!-- Pull Request Assign --> <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}}> - <label>{{.i18n.Tr "repo.settings.event_repository"}}</label> - <span class="help">{{.i18n.Tr "repo.settings.event_repository_desc"}}</span> + <input class="hidden" name="pull_request_assign" type="checkbox" tabindex="0" {{if .Webhook.PullRequestAssign}}checked{{end}}> + <label>{{.i18n.Tr "repo.settings.event_pull_request_assign"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_pull_request_assign_desc"}}</span> </div> </div> </div> - <!-- Release --> + <!-- Pull Request Label --> <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}}> - <label>{{.i18n.Tr "repo.settings.event_release"}}</label> - <span class="help">{{.i18n.Tr "repo.settings.event_release_desc"}}</span> + <input class="hidden" name="pull_request_label" type="checkbox" tabindex="0" {{if .Webhook.PullRequestLabel}}checked{{end}}> + <label>{{.i18n.Tr "repo.settings.event_pull_request_label"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_pull_request_label_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_pull_request_milestone"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_pull_request_milestone_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_pull_request_comment"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_pull_request_comment_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_pull_request_review"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_pull_request_review_desc"}}</span> + </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}}> + <label>{{.i18n.Tr "repo.settings.event_pull_request_sync"}}</label> + <span class="help">{{.i18n.Tr "repo.settings.event_pull_request_sync_desc"}}</span> </div> </div> </div> |