Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
feat(set-github-labels): simplify auth
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Oct 2, 2018
1 parent 9ea48a8 commit c59bc95
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/scripts/set-github-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ const githubAPICaller = (path, { method = 'GET', body } = {}) =>
fetch(`https://api.github.com${encodeURI(path)}`, {
method,
headers: {
Authorization: `Basic ${Buffer.from(
`epiqueras:${process.env.GITHUB_PERSONAL_ACCESS_TOKEN}`
).toString('base64')}`
Authorization: `token ${process.env.GITHUB_PERSONAL_ACCESS_TOKEN}`
},
body: body && JSON.stringify(body)
}).then(res => (method === 'DELETE' ? res : res.json()))
Expand Down

0 comments on commit c59bc95

Please sign in to comment.