Skip to content

Commit

Permalink
🐛 Add GH_PAT to Octokit
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary authored Mar 25, 2021
1 parent 88c7f8e commit 154bcec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getConfig } from "./config";
export const getOctokit = async (): Promise<Octokit> => {
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",
});
};

0 comments on commit 154bcec

Please sign in to comment.