use header for service test runner auth (#4658)

This commit is contained in:
chris48s
2020-02-16 12:32:26 +00:00
committed by GitHub
parent 52880baf1a
commit 8f094a760b

View File

@@ -25,8 +25,10 @@ async function getTitle(owner, repo, pullRequest) {
} = await got(
`https://api.github.com/repos/${owner}/${repo}/pulls/${pullRequest}`,
{
headers: { 'User-Agent': 'badges/shields' },
query: { access_token: process.env.GITHUB_TOKEN },
headers: {
'User-Agent': 'badges/shields',
Authorization: `token ${process.env.GITHUB_TOKEN}`,
},
json: true,
}
)