Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function run () {
const { body } = await HTTP.post(`https://api.github.com/app/installations/${installation}/access_tokens`, {
headers: {
Authorization: `Bearer ${token}`,
Accept: 'application/vnd.github.machine-man-preview+json"'
}
})
console.log(body.token)
}
async function post (path, body) {
const opts = Object.assign({body}, getRequestOpts())
const req = await HTTP.post(url.resolve(config.uplink.href, path), opts)
return req.body
}