Skip to content

Commit f24b1d8

Browse files
committed
fix: rename github env variable
1 parent be24e80 commit f24b1d8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/github.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ type Repositories = Endpoints["GET /orgs/{org}/repos"]["response"]["data"];
77
export const githubOrganization = "vrchatapi";
88
export const githubRepository = "vrchat.community";
99

10-
export const githubApiKey = process.env.GITHUB_API_KEY;
11-
invariant(githubApiKey, "Missing environment variable: GITHUB_API_KEY")
10+
export const githubAccessKey = process.env.GH_TOKEN;
11+
if (!githubAccessKey) throw new ReferenceError("Missing environment variable: GH_TOKEN");
1212

1313
export const githubUrl = `https://github.com/${githubOrganization}/${githubRepository}`;
1414

@@ -17,7 +17,7 @@ export async function getRepositories(owner: string) {
1717
const response = await fetch(url, {
1818
headers: {
1919
Accept: "application/vnd.github+json",
20-
Authorization: `Bearer ${githubApiKey}`
20+
Authorization: `Bearer ${githubAccessKey}`
2121
},
2222
});
2323

@@ -35,7 +35,7 @@ async function getCommits(owner: string, repository: string, pathname?: string)
3535
const response = await fetch(url, {
3636
headers: {
3737
Accept: "application/vnd.github+json",
38-
Authorization: `Bearer ${githubApiKey}`
38+
Authorization: `Bearer ${githubAccessKey}`
3939
},
4040
});
4141

0 commit comments

Comments
 (0)