Skip to content

Commit 504dfc8

Browse files
committed
fix conditional
1 parent 4f9b372 commit 504dfc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: backend/utils/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (gh DiggerGithubRealClientProvider) FetchCredentials(githubAppId string) (s
115115
webhookSecret := os.Getenv("GITHUB_WEBHOOK_SECRET")
116116
privateKeyb64 := os.Getenv("GITHUB_APP_PRIVATE_KEY_BASE64")
117117

118-
if clientId == "" || clientSecret == "" || webhookSecret == "" {
118+
if clientId == "" || clientSecret == "" || webhookSecret == "" || privateKeyb64 == "" {
119119
return "", "", "", "", fmt.Errorf("the values of GITHUB_APP_CLIENT_ID or GITHUB_APP_CLIENT_SECRET are not set")
120120
}
121121
return clientId, clientSecret, webhookSecret, privateKeyb64, nil

Diff for: ee/backend/providers/github/providers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (gh DiggerGithubEEClientProvider) FetchCredentials(githubAppId string) (str
101101
webhookSecret := os.Getenv("GITHUB_WEBHOOK_SECRET")
102102
privateKeyb64 := os.Getenv("GITHUB_APP_PRIVATE_KEY_BASE64")
103103

104-
if clientId != "" && clientSecret != "" && webhookSecret != "" && privateKeyb64 != "" {
104+
if clientId == "" || clientSecret == "" || webhookSecret == "" || privateKeyb64 == "" {
105105
log.Printf("Info: found github client credentials from env variables, using those")
106106
return clientId, clientSecret, webhookSecret, privateKeyb64, nil
107107
}

0 commit comments

Comments
 (0)