Skip to content

Commit

Permalink
🐛 Remove redundant check for git token (#5)
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

Signed-off-by: janiskemper <[email protected]>
  • Loading branch information
janiskemper committed Sep 18, 2023
1 parent 7f7925f commit f8a4caa
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 = os.Getenv(EnvGitAccessToken)

return gitCfg, nil
}

0 comments on commit f8a4caa

Please sign in to comment.