From 4cc35697b096ec526402575010967bc90861c0f0 Mon Sep 17 00:00:00 2001 From: Shawna Monero Date: Sun, 26 May 2024 13:16:05 -0700 Subject: [PATCH] add webhook secret for extra github rate limit --- server/config/raw/global_cfg.go | 14 ++++++++------ server/config/valid/global_cfg.go | 7 ++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/server/config/raw/global_cfg.go b/server/config/raw/global_cfg.go index 2990e5bdb..1c466eaf6 100644 --- a/server/config/raw/global_cfg.go +++ b/server/config/raw/global_cfg.go @@ -31,16 +31,18 @@ type GlobalCfg struct { } type ExtraGithubRateLimit struct { - GHSlug string `yaml:"gh_slug" json:"gh_slug"` - GHAppID int `yaml:"gh_app_id" json:"gh_app_id"` - GHAppKeyPath string `yaml:"gh_app_key_path" json:"gh_app_key_path"` + GHSlug string `yaml:"gh_slug" json:"gh_slug"` + GHAppID int `yaml:"gh_app_id" json:"gh_app_id"` + GHAppKeyPath string `yaml:"gh_app_key_path" json:"gh_app_key_path"` + GHWebHookSecret string `yamml:"gh_webhook_secret" json:"gh_webhook_secret"` } func (t ExtraGithubRateLimit) ToValid() valid.ExtraGithubRateLimit { return valid.ExtraGithubRateLimit{ - GHSlug: t.GHSlug, - GHAppID: t.GHAppID, - GHAppKeyPath: t.GHAppKeyPath, + GHSlug: t.GHSlug, + GHAppID: t.GHAppID, + GHAppKeyPath: t.GHAppKeyPath, + GHWebHookSecret: t.GHWebHookSecret, } } diff --git a/server/config/valid/global_cfg.go b/server/config/valid/global_cfg.go index 89811f0fc..54e9d85d1 100644 --- a/server/config/valid/global_cfg.go +++ b/server/config/valid/global_cfg.go @@ -70,9 +70,10 @@ type GlobalCfg struct { // This is here for using an extra github app type ExtraGithubRateLimit struct { - GHSlug string - GHAppID int // note that this is also known as the "integration ID" - GHAppKeyPath string + GHSlug string + GHAppID int // note that this is also known as the "integration ID" + GHAppKeyPath string + GHWebHookSecret string } type AdhocMode struct {