add back authorization header for github api (#3529)

This commit is contained in:
Shu Ding
2020-01-09 22:58:33 +08:00
committed by GitHub
parent 4dd640636c
commit 7e584be2cd
2 changed files with 6 additions and 0 deletions

View File

@@ -10,6 +10,9 @@ export async function getGitHubRepoInfo(repo: Repo) {
const response = await fetch(`https://api.github.com/repos/${repo.repo}`, {
headers: {
Accept: 'application/vnd.github.machine-man-preview+json',
// If we don't use a personal access token,
// it will get rate limited very easily.
Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`
},
});