Skip to content

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

Merged
pajlada merged 4 commits intoChatterino:masterfrom
M4tthewDE:feature/youtube-api-key-missing-not-handled-correctly
Nov 21, 2023
Merged

Don't initialize youtube resolver if youtube-api-key is empty#556
pajlada merged 4 commits intoChatterino:masterfrom
M4tthewDE:feature/youtube-api-key-missing-not-handled-correctly

Conversation

@M4tthewDE
Copy link
Copy Markdown
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

@codecov
Copy link
Copy Markdown

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.

@M4tthewDE M4tthewDE requested a review from pajlada November 21, 2023 21:00
Comment thread internal/resolvers/youtube/initialize_test.go Outdated
@pajlada pajlada merged commit ec893ba into Chatterino:master Nov 21, 2023
@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