Skip to content

Commit 2c892c7

Browse files
authored
Merge pull request #14936 from TylerAPfledderer/fix/fetchGitHistory-token-env
fix(fetchGitHistory): update github token env key name
2 parents 8b9025c + 9a4a481 commit 2c892c7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# NEXT_PUBLIC_ALGOLIA_APP_ID=insertValue
88
# NEXT_PUBLIC_ALGOLIA_SEARCH_KEY=insertValue
99
# NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME=insertValue
10+
11+
# Github token for read-only use with api functions
1012
# NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY=insertValue
1113

1214
# Etherscan API key (required for Etherscan API fetches)

src/lib/api/fetchGitHistory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function fetchWithRateLimit(filepath: string): Promise<Commit[]> {
1111
url.searchParams.set("path", filepath)
1212
url.searchParams.set("sha", "master")
1313

14-
const gitHubToken = process.env.GITHUB_TOKEN_READ_ONLY
14+
const gitHubToken = process.env.NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY
1515

1616
// If no token available, return empty array
1717
if (!gitHubToken) return []

0 commit comments

Comments
 (0)