diff options
author | WGH <wgh@torlan.ru> | 2019-09-09 08:48:21 +0300 |
---|---|---|
committer | Lauris BH <lauris.buksis@zzdats.lv> | 2019-09-09 08:48:21 +0300 |
commit | 6ddd3b0b470d16dfe62caf5fff21011cfff44a76 (patch) | |
tree | 05d4c7fedf8af21b489003890be000f839f69a51 /templates | |
parent | 0118b6aaf8ada3edd67cb975c776f6f124178ad2 (diff) | |
download | gitea-6ddd3b0b470d16dfe62caf5fff21011cfff44a76.tar.gz gitea-6ddd3b0b470d16dfe62caf5fff21011cfff44a76.zip |
Implement webhook branch filter (#7791)
* Fix validate() function to handle errors in embedded anon structs
* Implement webhook branch filter
See #2025, #3998.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/settings/webhook/settings.tmpl | 7 | ||||
-rw-r--r-- | templates/swagger/v1_json.tmpl | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl index 3f9f739775..a033ac14bb 100644 --- a/templates/repo/settings/webhook/settings.tmpl +++ b/templates/repo/settings/webhook/settings.tmpl @@ -116,6 +116,13 @@ </div> </div> +<!-- Branch filter --> +<div class="field"> + <label for="branch_filter">{{.i18n.Tr "repo.settings.branch_filter"}}</label> + <input name="branch_filter" type="text" tabindex="0" value="{{or .Webhook.BranchFilter "*"}}"> + <span class="help">{{.i18n.Tr "repo.settings.branch_filter_desc" | Str2html}}</span> +</div> + <div class="ui divider"></div> <div class="inline field"> diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 33c0c38f82..69d100e00c 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -7528,6 +7528,10 @@ "default": false, "x-go-name": "Active" }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, "config": { "type": "object", "additionalProperties": { @@ -8124,6 +8128,10 @@ "type": "boolean", "x-go-name": "Active" }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, "config": { "type": "object", "additionalProperties": { |