From 154bcec18b8b8ab73538113b8cd4df4a75a67130 Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Thu, 25 Mar 2021 12:15:49 +0530 Subject: [PATCH] :bug: Add GH_PAT to Octokit --- src/helpers/github.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/github.ts b/src/helpers/github.ts index e7bb8b79..581ef86e 100644 --- a/src/helpers/github.ts +++ b/src/helpers/github.ts @@ -4,7 +4,7 @@ import { getConfig } from "./config"; export const getOctokit = async (): Promise => { const config = await getConfig(); return new Octokit({ - auth: config.PAT || process.env.GITHUB_TOKEN, + auth: config.PAT || process.env.GH_PAT || process.env.GITHUB_TOKEN, userAgent: config["user-agent"] || process.env.USER_AGENT || "KojBot", }); };