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

Don't initialize youtube resolver if youtube-api-key is empty #556

Conversation

M4tthewDE
Copy link
Contributor

@M4tthewDE M4tthewDE commented Nov 21, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Don't initialize youtube resolver if api key is empty. As far as I can tell from reading the source, the package we are using does not care about the api key being empty and does not return an error.

The test in intialize_test.go fails for me locally, but it passes in CI.
That might be worth an investigation?
Turns out google.golang.org/api/youtube/v3 automatically pulls in creentials from GOOGLE_APPLICATION_CREDENTIALS

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a7a27dd) 47.22% compared to head (ccec2bd) 47.13%.

Files Patch % Lines
internal/resolvers/youtube/initialize.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
- Coverage   47.22%   47.13%   -0.09%     
==========================================
  Files          99       99              
  Lines        3733     3738       +5     
==========================================
- Hits         1763     1762       -1     
- Misses       1918     1923       +5     
- Partials       52       53       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pajlada pajlada merged commit ec893ba into Chatterino:master Nov 21, 2023
9 of 10 checks passed
@M4tthewDE M4tthewDE deleted the feature/youtube-api-key-missing-not-handled-correctly branch December 18, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants