[REFACTOR] simplify checkHookType
This commit is contained in:
parent
c0dd92e9c5
commit
9c3611ec50
2 changed files with 8 additions and 25 deletions
|
@ -15,7 +15,6 @@ var Webhook = struct {
|
|||
DeliverTimeout int
|
||||
SkipTLSVerify bool
|
||||
AllowedHostList string
|
||||
Types []string
|
||||
PagingNum int
|
||||
ProxyURL string
|
||||
ProxyURLFixed *url.URL
|
||||
|
@ -35,7 +34,6 @@ func loadWebhookFrom(rootCfg ConfigProvider) {
|
|||
Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5)
|
||||
Webhook.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool()
|
||||
Webhook.AllowedHostList = sec.Key("ALLOWED_HOST_LIST").MustString("")
|
||||
Webhook.Types = []string{"forgejo", "gitea", "gogs", "slack", "discord", "dingtalk", "telegram", "msteams", "feishu", "matrix", "wechatwork", "packagist"}
|
||||
Webhook.PagingNum = sec.Key("PAGING_NUM").MustInt(10)
|
||||
Webhook.ProxyURL = sec.Key("PROXY_URL").MustString("")
|
||||
if Webhook.ProxyURL != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue