Repository navigation
Ignore empty GitHub API keys - #484
Conversation
Signed-off-by: Juan Pasutti <juanpasutti@gmail.com>
Signed-off-by: Juan Pasutti <juanpasutti@gmail.com>
id say for this if you update your pr description to say "fixes part of" the referenced issue (break the automatic closure that will otherwise happen when this merges) and then we can have the gitlab version in another PR. |
Signed-off-by: Juan Pasutti <juanpasutti@gmail.com>
ba479f3 to
5e74418
Compare
Signed-off-by: Juan Pasutti <juanpasutti@gmail.com>
|
@drkrillo sorry this kinda fell off the wagon - PR looks good (and thanks for including unit tests) - my main concern is what reviewdog flagged about |
Signed-off-by: Juan Pasutti <juanpasutti@gmail.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
hey, yes, the asserts do work but pylint couldnt see that |
|
SGTM! |
Description
When
COLLECTOSS_GITHUB_API_KEYenv variable was set to one or more whitespaces or left empty, that counted as set config_key, causinghttpx.LocalProtocolError: Illegal header value b'token '.Now, in
GithubApiKeyHandler.get_api_keys():None, the warning is not logged and doesn't add the key (already covered before the fix).Added
tests/test_classes/test_github_api_keys.pycovering the config key cases:empty and whitespaces with and without database keys,
None, and a valid key. Each oneasserts the key list, if the key is probed, and the warning.
docker compose up --buildlogs after the fix:This PR fixes part of #378
Notes for Reviewers
GitlabApiKeyHandler.get_api_keys(). I didn't add that fix here, just GitHub's. Let me know if I can open up a follow-up PR, open an issue (or both) or add the code and tests in this same PR.Signed commits
Generative AI disclosure
Please select one option:
If AI tools were used, please provide details below:
- What tools were used? Claude
- How were these tools used? Code review and tests guidance (not writing, suggested new ones covering cases I didn't consider)
- Did you review these outputs before submitting this PR? Yes, all the code was written by me, trying different approaches and Claude was used to review the changes.
Summary by CodeRabbit