Skip to content

Commit

Permalink
Fix github webhook secret envvar name. (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynch authored Sep 3, 2024
1 parent ccd3cf8 commit 16f2d08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/envconfig/envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type EnvConfigApp struct {
}

type EnvConfigWebhook struct {
WebhookSecret string `envconfig:"WEBHOOK_SECRET" required:"true"`
WebhookSecret string `envconfig:"GITHUB_WEBHOOK_SECRET" required:"true"`
// If set, only process events from these organizations (comma separated).
OrganizationFilter string `envconfig:"GITHUB_ORGANIZATION_FILTER"`
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/envconfig/envconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ func TestWebhookConfig(t *testing.T) {
{
name: "No environment variables set",
envVars: map[string]string{
"WEBHOOK_SECRET": "",
"GITHUB_WEBHOOK_SECRET": "",
},
wantErr: false,
},
{
name: "All environment variables set",
envVars: map[string]string{
"WEBHOOK_SECRET": "octo-sts-test.local",
"GITHUB_WEBHOOK_SECRET": "octo-sts-test.local",
},
wantErr: false,
},
Expand Down

0 comments on commit 16f2d08

Please sign in to comment.