diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-02-12 16:48:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 08:48:28 +0000 |
commit | 83a8944fcf64af9bf5b0a4e233f9a7f917838a4d (patch) | |
tree | ebb4436506a4e36939fcfa358ccb09dfd3a01d3a /templates/repo/settings | |
parent | ea7ad382e78486fc881bf46d9c1c004e3f311163 (diff) | |
download | gitea-83a8944fcf64af9bf5b0a4e233f9a7f917838a4d.tar.gz gitea-83a8944fcf64af9bf5b0a4e233f9a7f917838a4d.zip |
Add feishu webhook support (#10229)
Add feishu webhook support
Diffstat (limited to 'templates/repo/settings')
-rw-r--r-- | templates/repo/settings/webhook/feishu.tmpl | 11 | ||||
-rw-r--r-- | templates/repo/settings/webhook/list.tmpl | 3 | ||||
-rw-r--r-- | templates/repo/settings/webhook/new.tmpl | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/templates/repo/settings/webhook/feishu.tmpl b/templates/repo/settings/webhook/feishu.tmpl new file mode 100644 index 0000000000..95a5102530 --- /dev/null +++ b/templates/repo/settings/webhook/feishu.tmpl @@ -0,0 +1,11 @@ +{{if eq .HookType "feishu"}} + <p>{{.i18n.Tr "repo.settings.add_feishu_hook_desc" "https://feishu.cn" | Str2html}}</p> + <form class="ui form" action="{{.BaseLink}}/feishu/{{or .Webhook.ID "new"}}" method="post"> + {{.CsrfTokenHtml}} + <div class="required field {{if .Err_PayloadURL}}error{{end}}"> + <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label> + <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required> + </div> + {{template "repo/settings/webhook/settings" .}} + </form> +{{end}} diff --git a/templates/repo/settings/webhook/list.tmpl b/templates/repo/settings/webhook/list.tmpl index 5813b74914..0bdc95fa39 100644 --- a/templates/repo/settings/webhook/list.tmpl +++ b/templates/repo/settings/webhook/list.tmpl @@ -26,6 +26,9 @@ <a class="item" href="{{.BaseLink}}/msteams/new"> <img class="img-10" src="{{StaticUrlPrefix}}/img/msteams.png">Microsoft Teams </a> + <a class="item" href="{{.BaseLink}}/feishu/new"> + <img class="img-10" src="{{StaticUrlPrefix}}/img/feishu.png">Feishu + </a> </div> </div> </div> diff --git a/templates/repo/settings/webhook/new.tmpl b/templates/repo/settings/webhook/new.tmpl index 1d5d849738..d02da057f2 100644 --- a/templates/repo/settings/webhook/new.tmpl +++ b/templates/repo/settings/webhook/new.tmpl @@ -21,6 +21,8 @@ <img class="img-13" src="{{StaticUrlPrefix}}/img/telegram.png"> {{else if eq .HookType "msteams"}} <img class="img-13" src="{{StaticUrlPrefix}}/img/msteams.png"> + {{else if eq .HookType "feishu"}} + <img class="img-13" src="{{StaticUrlPrefix}}/img/feishu.png"> {{end}} </div> </h4> @@ -32,6 +34,7 @@ {{template "repo/settings/webhook/dingtalk" .}} {{template "repo/settings/webhook/telegram" .}} {{template "repo/settings/webhook/msteams" .}} + {{template "repo/settings/webhook/feishu" .}} </div> {{template "repo/settings/webhook/history" .}} |