Skip to content

Commit

Permalink
fix incorrect token usage
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Jan 31, 2022
1 parent 51b38d5 commit 6b706d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewRepoInfo(cfg *velox.Config, log *zap.Logger) *GHRepo {
var client *http.Client

// if token exists, use it to increase rate limiter
if t, ok := cfg.Token[tokenKey]; ok {
if t := cfg.Token[tokenKey]; t != "" {
ctx := context.Background()
ts := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: t})
client = oauth2.NewClient(ctx, ts)
Expand Down

0 comments on commit 6b706d7

Please sign in to comment.