Skip to content

Commit

Permalink
Prefix env variables with GITHUB_
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasamft committed Sep 30, 2022
1 parent 0c52520 commit b0f46b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ func createJwtJose(appId string, key string) string {
}

func getEnvs() (string, string, string) {
installationId, ok := os.LookupEnv("INSTALLATION_ID")
installationId, ok := os.LookupEnv("GITHUB_INSTALLATION_ID")
if !ok {
panic("INSTALLATION_ID not set")
panic("GITHUB_INSTALLATION_ID not set")
}
appId, ok := os.LookupEnv("APP_ID")
appId, ok := os.LookupEnv("GITHUB_APP_ID")
if !ok {
panic("APP_ID not set")
panic("GITHUB_APP_ID not set")
}
privateKey, ok := os.LookupEnv("PRIVATE_KEY")
privateKey, ok := os.LookupEnv("GITHUB_APP_PRIVATE_KEY")
if !ok {
panic("PRIVATE_KEY not set")
panic("GITHUB_APP_PRIVATE_KEY not set")
}

return installationId, appId, strings.Replace(privateKey, "\\n", "\n", -1)
Expand Down

0 comments on commit b0f46b2

Please sign in to comment.