Commit d8a29ce8 authored by Robert Knight's avatar Robert Knight

Update create-github-release script for Octokit auth API change

Update script to authenticate using the new API documented at
https://github.com/octokit/rest.js#authentication
parent 5cd5e229
......@@ -9,7 +9,7 @@
* `v<VERSION>` where <VERSION> is the `version` field in package.json.
*/
const octokit = require('@octokit/rest')();
const Octokit = require('@octokit/rest');
const pkg = require('../package.json');
const { changelistSinceTag } = require('./generate-change-list');
......@@ -26,9 +26,8 @@ async function createGitHubRelease() {
throw new Error('GITHUB_TOKEN env var is not set');
}
octokit.authenticate({
type: 'oauth',
token: process.env.GITHUB_TOKEN,
const octokit = new Octokit({
auth: `token ${process.env.GITHUB_TOKEN}`,
});
const changes = await changelistSinceTag(octokit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment