summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorS7evinK <tfaelligen@gmail.com>2020-03-28 14:09:55 +0100
committerGitHub <noreply@github.com>2020-03-28 15:09:55 +0200
commit828a27feeb11474b848be183a8fce2d036dec3cc (patch)
tree5182b9bfdb34b9e8f4cc4e61d956ed425a334e9a /modules/setting
parent7cd47046ea6e1fde2c88290a42f345795aee0ea4 (diff)
downloadgitea-828a27feeb11474b848be183a8fce2d036dec3cc.tar.gz
gitea-828a27feeb11474b848be183a8fce2d036dec3cc.zip
Add Matrix webhook (#10831)
* Add Matrix webhook Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add template and related translations for Matrix hook Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add actual webhook routes and form Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add missing file Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Update modules/webhook/matrix_test.go * Use stricter regex to replace URLs Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Escape url and text Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Remove unnecessary whitespace * Fix copy and paste mistake Co-Authored-By: Tulir Asokan <tulir@maunium.net> * Fix indention inconsistency * Use Authorization header instead of url parameter * Add raw commit information to webhook Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Tulir Asokan <tulir@maunium.net>
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/webhook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/webhook.go b/modules/setting/webhook.go
index 3e6040a605..4a0c593c8d 100644
--- a/modules/setting/webhook.go
+++ b/modules/setting/webhook.go
@@ -36,7 +36,7 @@ func newWebhookService() {
Webhook.QueueLength = sec.Key("QUEUE_LENGTH").MustInt(1000)
Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5)
Webhook.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool()
- Webhook.Types = []string{"gitea", "gogs", "slack", "discord", "dingtalk", "telegram", "msteams", "feishu"}
+ Webhook.Types = []string{"gitea", "gogs", "slack", "discord", "dingtalk", "telegram", "msteams", "feishu", "matrix"}
Webhook.PagingNum = sec.Key("PAGING_NUM").MustInt(10)
Webhook.ProxyURL = sec.Key("PROXY_URL").MustString("")
if Webhook.ProxyURL != "" {