Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME=insertValue

# Github token for read-only use with api functions
# NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY=insertValue
# GITHUB_TOKEN_READ_ONLY=insertValue

# Etherscan API key (required for Etherscan API fetches)
# ETHERSCAN_API_KEY=insertValue
Expand Down
2 changes: 1 addition & 1 deletion docs/api-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We recommend setting this up when running the project locally, as we use the Git

```sh
# .env Example:
NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY=48f84de812090000demo00000000697cf6e6a059
GITHUB_TOKEN_READ_ONLY=48f84de812090000demo00000000697cf6e6a059
```

2. Add Etherscan API token (free)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/api/fetchGFIs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const fetchGFIs = async () => {
try {
const response = await fetch(url, {
headers: {
Authorization: `token ${process.env.NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY}`,
Authorization: `token ${process.env.GITHUB_TOKEN_READ_ONLY}`,
Accept: "application/vnd.github.v3+json",
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib/api/fetchGitHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function fetchWithRateLimit(filepath: string): Promise<Commit[]> {
url.searchParams.set("path", filepath)
url.searchParams.set("sha", "master")

const gitHubToken = process.env.NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY
const gitHubToken = process.env.GITHUB_TOKEN_READ_ONLY

// If no token available, return empty array
if (!gitHubToken) return []
Expand Down
4 changes: 2 additions & 2 deletions src/lib/api/ghRepoData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const ghRepoData = async (githubUrl: string) => {
`https://api.github.com/repos/${repoOwner}/${repoName}`,
{
headers: {
Authorization: `Bearer ${process.env.NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY}`,
Authorization: `Bearer ${process.env.GITHUB_TOKEN_READ_ONLY}`,
},
}
)
Expand All @@ -121,7 +121,7 @@ export const ghRepoData = async (githubUrl: string) => {
`https://api.github.com/repos/${repoOwner}/${repoName}/languages`,
{
headers: {
Authorization: `Bearer ${process.env.NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY}`,
Authorization: `Bearer ${process.env.GITHUB_TOKEN_READ_ONLY}`,
},
}
)
Expand Down