Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
  • Loading branch information
trodge and melinath authored Mar 5, 2024
1 parent 7ed4c2a commit 924bd7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .ci/magician/cmd/generate_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ var generateCommentCmd = &cobra.Command{

for _, tokenName := range []string{"GITHUB_TOKEN_DOWNSTREAMS", "GITHUB_TOKEN_MAGIC_MODULES"} {
val, ok := lookupGithubTokenOrFallback(tokenName)
if !ok {
fmt.Printf("Did not provide %s or GITHUB_TOKEN environment variable\n", tokenName)
os.Exit(1)
if ok {
env[tokenName] = val
break
}
env[tokenName] = val
}
gh := github.NewClient(env["GITHUB_TOKEN_MAGIC_MODULES"])
rnr, err := exec.NewRunner()
Expand Down
7 changes: 3 additions & 4 deletions .ci/magician/cmd/test_terraform_vcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ var testTerraformVCRCmd = &cobra.Command{

for _, tokenName := range []string{"GITHUB_TOKEN_DOWNSTREAMS", "GITHUB_TOKEN_MAGIC_MODULES"} {
val, ok := lookupGithubTokenOrFallback(tokenName)
if !ok {
fmt.Printf("Did not provide %s or GITHUB_TOKEN environment variable\n", tokenName)
os.Exit(1)
if ok {
env[tokenName] = val
break
}
env[tokenName] = val
}

baseBranch := os.Getenv("BASE_BRANCH")
Expand Down

0 comments on commit 924bd7f

Please sign in to comment.