Handle updates via git webhooks

This commit is contained in:
simon987
2019-01-13 14:58:52 -05:00
parent a2b5de0e01
commit ef333b6b25
17 changed files with 514 additions and 70 deletions

View File

@@ -5,8 +5,11 @@ import (
)
var Cfg struct {
ServerAddr string
DbConnStr string
ServerAddr string
DbConnStr string
WebHookSecret []byte
WebHookHash string
WebHookSigHeader string
}
func SetupConfig() {
@@ -21,4 +24,7 @@ func SetupConfig() {
Cfg.ServerAddr = viper.GetString("server.address")
Cfg.DbConnStr = viper.GetString("database.conn_str")
Cfg.WebHookSecret = []byte(viper.GetString("git.webhook_secret"))
Cfg.WebHookHash = viper.GetString("git.webhook_hash")
Cfg.WebHookSigHeader = viper.GetString("git.webhook_sig_header")
}