Skip to content

Commit 1ab57ea

Browse files
committed
fix: Log if the GitHub API call was authorized
1 parent 35dcfaa commit 1ab57ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ async function retry(action) {
3232

3333
function fetchSafely(url, token, options = {}) {
3434
return retry(async () => {
35-
log('fetch "%s"', url)
36-
/* c8 ignore next 7 */
35+
/* c8 ignore next 8 */
3736
if (!token) token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN
3837
if (token) {
3938
options.headers = {
4039
Authorization: `Bearer ${token}`,
4140
...options.headers
4241
}
4342
}
43+
log('fetch "%s"%s', url, token ? ' (authorized)' : '')
4444
options = {
4545
'User-Agent': 'prantlf/grab-github-release',
4646
'X-GitHub-Api-Version': '2022-11-28',

0 commit comments

Comments
 (0)