Only set `Authorization` when `token` is available by jsoref · Pull Request #3789 · google/go-github
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merging.
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (98a62fd) to head (cdc8ba1).
⚠️ Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #3789 +/- ## ========================================== + Coverage 91.50% 92.14% +0.63% ========================================== Files 190 190 Lines 17007 13627 -3380 ========================================== - Hits 15562 12556 -3006 + Misses 1257 883 -374 Partials 188 188
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
jsoref
deleted the
only-set-auth-when-token-available
branch
Comment on lines +357 to +359
| if token != "" { | ||
| req.Header.Set("Authorization", fmt.Sprintf("Bearer %v", token)) | ||
| } |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a test for this #3790
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters