We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83c5b0c commit a78f0eeCopy full SHA for a78f0ee
src/handler.ts
@@ -10,7 +10,7 @@ import { sanitizeVersion } from './utils/versioning'
10
declare global {
11
const GITHUB_ACCOUNT: string
12
const GITHUB_REPO: string
13
- const GITHUB_TOKEN: string | undefined
+ const GITHUB_TOKEN: string
14
}
15
16
const responses = {
src/services/github.ts
@@ -8,7 +8,7 @@ export const getReleases = async (request: Request): Promise<Response> => {
8
'User-Agent': request.headers.get('User-Agent') as string,
9
})
- if (GITHUB_TOKEN) headers.set('Authorization', `token ${GITHUB_TOKEN}`)
+ if (GITHUB_TOKEN?.length) headers.set('Authorization', `token ${GITHUB_TOKEN}`)
return await fetch(reqUrl.toString(), {
method: 'GET',
0 commit comments