Lunny Xiao
33fca2b537
Move webhook into models/webhook/ ( #17579 )
2021-11-10 13:13:16 +08:00
Lunny Xiao
9f31f3aa8a
Add an abstract json layout to make it's easier to change json library ( #16528 )
...
* Add an abstract json layout to make it's easier to change json library
* Fix import
* Fix import sequence
* Fix blank lines
* Fix blank lines
2021-07-24 18:03:58 +02:00
KN4CK3R
9b1b4b5433
Refactor Webhook + Add X-Hub-Signature ( #16176 )
...
This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`.
## ⚠️ BREAKING ⚠️
* The `Secret` field is no longer passed as part of the payload.
* "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129).
Close #16115
Fixes #7788
Fixes #11755
Co-authored-by: zeripath <[email protected] >
2021-06-27 20:21:09 +01:00
KN4CK3R
4fcae3d06d
Add tests for all webhooks ( #16214 )
...
* Added tests for MS Teams.
* Added tests for Dingtalk.
* Added tests for Telegram.
* Added tests for Feishu.
* Added tests for Discord.
* Added tests for closed issue and pullrequest comment.
* Added tests for Matrix.
* Trim all spaces.
* Added tests for Slack.
* Added JSONPayload tests.
* Added general tests.
* Replaced duplicated code.
Co-authored-by: Lunny Xiao <[email protected] >
2021-06-20 22:12:19 -04:00
zeripath
f0e15250b9
Migrate to use jsoniter instead of encoding/json ( #14841 )
...
* Migrate to use jsoniter
* fix tests
* update gitea.com/go-chi/binding
Signed-off-by: Andrew Thornton <[email protected] >
Co-authored-by: 6543 <[email protected] >
2021-03-01 22:08:10 +01:00
Lunny Xiao
ea914d0f7a
Fix bug for webhook and feishu caused by API changed ( #13937 )
...
* Fix bug for webhook
* Fix bug for feishu
2020-12-11 17:04:04 +01:00
Lunny Xiao
42354dfe45
Move webhook type from int to string ( #13664 )
...
* Move webhook type from int to string
* rename webhook_services
* finish refactor
* Fix merge
* Ignore unnecessary ci
Co-authored-by: 6543 <[email protected] >
Co-authored-by: zeripath <[email protected] >
2020-12-08 11:41:14 +01:00