Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Use static token in GitHub source #3834

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

mcastorina
Copy link
Collaborator

Description:

Also some minor formatting in sources.go

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Also some minor formatting in sources.go
@mcastorina mcastorina requested review from a team as code owners January 8, 2025 20:53
Comment on lines 30 to 34
tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token})
httpClient.Transport = &oauth2.Transport{
Base: httpClient.Transport,
Source: oauth2.ReuseTokenSource(nil, tokenSource),
Source: tokenSource,
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I misunderstood what ReuseTokenSource does, but since tokenSource is a StaticTokenSource, I didn't think we needed the ReuseTokenSource to wrap it.

Copy link
Collaborator

@rosecodym rosecodym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems straightforward to me. Thanks for the fix!

@mcastorina mcastorina merged commit fbf835f into main Jan 9, 2025
13 checks passed
@mcastorina mcastorina deleted the chore-spelunk-01072025 branch January 9, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants