Skip to content

Commit

Permalink
add webhook secret for extra github rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed May 26, 2024
1 parent 54a9851 commit 4cc3569
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 8 additions & 6 deletions server/config/raw/global_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down
7 changes: 4 additions & 3 deletions server/config/valid/global_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4cc3569

Please sign in to comment.