Skip to content

Commit

Permalink
fix: allow passing CENTRAL_WEBHOOK_API_KEY env var for api key
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 29, 2025
1 parent 416615d commit 209b99b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func main() {
defaultUpdateEntityUrl := os.Getenv("CENTRAL_WEBHOOK_UPDATE_ENTITY_URL")
defaultNewSubmissionUrl := os.Getenv("CENTRAL_WEBHOOK_NEW_SUBMISSION_URL")
defaultReviewSubmissionUrl := os.Getenv("CENTRAL_WEBHOOK_REVIEW_SUBMISSION_URL")
defaultApiKey := os.Getenv("CENTRAL_WEBHOOK_API_KEY")
defaultLogLevel := os.Getenv("CENTRAL_WEBHOOK_LOG_LEVEL")

var dbUri string
Expand All @@ -165,7 +166,7 @@ func main() {
flag.StringVar(&reviewSubmissionUrl, "reviewSubmissionUrl", defaultReviewSubmissionUrl, "Webhook URL for review submission events")

var apiKey string
flag.StringVar(&apiKey, "apiKey", "", "X-API-Key header value, for autenticating with webhook API")
flag.StringVar(&apiKey, "apiKey", defaultApiKey, "X-API-Key header value, for autenticating with webhook API")

var debug bool
flag.BoolVar(&debug, "debug", false, "Enable debug logging")
Expand Down

0 comments on commit 209b99b

Please sign in to comment.