Skip to content

Commit 16f2d08

Browse files
authored
Fix github webhook secret envvar name. (#485)
Matches https://github.com/octo-sts/app/blob/ccd3cf85e3e800c1acb84854aaf03c05b183a4db/modules/app/webhook.tf#L45 + other github envvar naming conventions.
1 parent ccd3cf8 commit 16f2d08

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/envconfig/envconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type EnvConfigApp struct {
2424
}
2525

2626
type EnvConfigWebhook struct {
27-
WebhookSecret string `envconfig:"WEBHOOK_SECRET" required:"true"`
27+
WebhookSecret string `envconfig:"GITHUB_WEBHOOK_SECRET" required:"true"`
2828
// If set, only process events from these organizations (comma separated).
2929
OrganizationFilter string `envconfig:"GITHUB_ORGANIZATION_FILTER"`
3030
}

pkg/envconfig/envconfig_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ func TestWebhookConfig(t *testing.T) {
150150
{
151151
name: "No environment variables set",
152152
envVars: map[string]string{
153-
"WEBHOOK_SECRET": "",
153+
"GITHUB_WEBHOOK_SECRET": "",
154154
},
155155
wantErr: false,
156156
},
157157
{
158158
name: "All environment variables set",
159159
envVars: map[string]string{
160-
"WEBHOOK_SECRET": "octo-sts-test.local",
160+
"GITHUB_WEBHOOK_SECRET": "octo-sts-test.local",
161161
},
162162
wantErr: false,
163163
},

0 commit comments

Comments
 (0)