Skip to content

Commit 20b6844

Browse files
committed
use secrets from env var
1 parent a96b265 commit 20b6844

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmd/config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ func LoadConfig(configPath string) (Config, error) {
4444
config.ServerEndpoint = "ws://localhost:3400/subscribe"
4545
}
4646

47+
if os.Getenv("GITHUB_WEBHOOK_SECRET") != "" {
48+
config.GithubSecret = os.Getenv("GITHUB_WEBHOOK_SECRET")
49+
}
50+
51+
if os.Getenv("SUBSCRIBE_SECRET") != "" {
52+
config.SubscribeSecret = os.Getenv("SUBSCRIBE_SECRET")
53+
}
54+
4755
validate := validator.New(validator.WithRequiredStructEnabled())
4856

4957
if err := validate.Struct(config); err != nil {

0 commit comments

Comments
 (0)