Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix github webhook secret envvar name. #485

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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