Skip to content

Commit

Permalink
🐛 Remove redundant check for git token
Browse files Browse the repository at this point in the history
Removing the redundant check for the git token that breaks in
open-source repos where there is no need for a token
  • Loading branch information
janiskemper committed Sep 18, 2023
1 parent 7f7925f commit 0769aa3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/github/client/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ func NewGitConfig() (GitConfig, error) {
}
gitCfg.GitRepoName = val

val, ok = os.LookupEnv(EnvGitAccessToken)
if val == "" || !ok {
return GitConfig{}, fmt.Errorf("environment variable %s is not set", EnvGitAccessToken)
}
gitCfg.GitAccessToken = val
gitCfg.GitAccessToken, ok = os.LookupEnv(EnvGitAccessToken)

Check failure on line 72 in pkg/github/client/credentials.go

View workflow job for this annotation

GitHub Actions / Lint Pull Request

ineffectual assignment to ok (ineffassign)

return gitCfg, nil
}

0 comments on commit 0769aa3

Please sign in to comment.