diff options
author | S7evinK <tfaelligen@gmail.com> | 2020-03-28 14:09:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 15:09:55 +0200 |
commit | 828a27feeb11474b848be183a8fce2d036dec3cc (patch) | |
tree | 5182b9bfdb34b9e8f4cc4e61d956ed425a334e9a /models/webhook.go | |
parent | 7cd47046ea6e1fde2c88290a42f345795aee0ea4 (diff) | |
download | gitea-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 'models/webhook.go')
-rw-r--r-- | models/webhook.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/webhook.go b/models/webhook.go index d161ca1ae9..5f3a285691 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -559,6 +559,7 @@ const ( TELEGRAM MSTEAMS FEISHU + MATRIX ) var hookTaskTypes = map[string]HookTaskType{ @@ -570,6 +571,7 @@ var hookTaskTypes = map[string]HookTaskType{ "telegram": TELEGRAM, "msteams": MSTEAMS, "feishu": FEISHU, + "matrix": MATRIX, } // ToHookTaskType returns HookTaskType by given name. @@ -596,6 +598,8 @@ func (t HookTaskType) Name() string { return "msteams" case FEISHU: return "feishu" + case MATRIX: + return "matrix" } return "" } |