refactor: throw error if REPOS_READ_ONLY is missing

pull/3/head
sgoudham 1 year ago
parent b57c4beddd
commit 631097c060
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -1,5 +1,9 @@
import { Octokit } from "octokit"; import { Octokit } from "octokit";
if (!process.env.REPOS_READ_ONLY) {
throw new Error("GITHUB TOKEN 'REPOS_READ_ONLY' is missing");
}
const octokit = new Octokit({ const octokit = new Octokit({
auth: process.env.REPOS_READ_ONLY, auth: process.env.REPOS_READ_ONLY,
}); });

Loading…
Cancel
Save