Skip to content

Commit

Permalink
fix(github): use bearer token (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 6, 2024
1 parent 7700c46 commit 214ac45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/github.ts
Expand Up @@ -32,8 +32,7 @@ export async function getGithubReleaseByTag(
): Promise<GithubRelease> {
return await githubFetch(
config,
`/repos/${config.repo.repo}/releases/tags/${tag}`,
{}
`/repos/${config.repo.repo}/releases/tags/${tag}`
);
}

Expand Down Expand Up @@ -151,9 +150,10 @@ async function githubFetch(
? "https://api.github.com"
: `https://${config.repo.domain}/api/v3`,
headers: {
"x-github-api-version": "2022-11-28",
...opts.headers,
authorization: config.tokens.github
? `Token ${config.tokens.github}`
? `Bearer ${config.tokens.github}`
: undefined,
},
});
Expand Down

0 comments on commit 214ac45

Please sign in to comment.