Skip to content

Commit f8a4caa

Browse files
authored
🐛 Remove redundant check for git token (#5)
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]>
1 parent 7f7925f commit f8a4caa

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/github/client/credentials.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ func NewGitConfig() (GitConfig, error) {
6969
}
7070
gitCfg.GitRepoName = val
7171

72-
val, ok = os.LookupEnv(EnvGitAccessToken)
73-
if val == "" || !ok {
74-
return GitConfig{}, fmt.Errorf("environment variable %s is not set", EnvGitAccessToken)
75-
}
76-
gitCfg.GitAccessToken = val
72+
gitCfg.GitAccessToken = os.Getenv(EnvGitAccessToken)
7773

7874
return gitCfg, nil
7975
}

0 commit comments

Comments
 (0)