Skip to content

Commit

Permalink
remove unwated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgparmar14 committed Jun 6, 2024
1 parent 6669679 commit 95804ed
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 589 deletions.
6 changes: 3 additions & 3 deletions lib/octokit.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import "server-only";
import { env } from "../env.mjs";
import { env } from "@/env.mjs";
import { Octokit } from "octokit";

export const getGitHubAccessToken = () => {
const accessToken = env.GITHUB_PAT as string | null;

if (!accessToken) {
if (env.NODE_ENV === "development") {
if (process.env.NODE_ENV === "development") {
console.warn("GITHUB_PAT is not configured in the environment.");
return;
}
Expand All @@ -21,4 +21,4 @@ const octokit = new Octokit({
auth: getGitHubAccessToken(),
});

export default octokit;
export default octokit;
Loading

0 comments on commit 95804ed

Please sign in to comment.