mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 01:08:31 +03:00
fix(stats): send User-Agent for GitHub star count (#58283)
Co-authored-by: jayair <53023+jayair@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
286425fcd4
commit
8c5b202815
@@ -10,7 +10,7 @@ export type HeaderLink = { href: string; label: string }
|
||||
export const githubLink = {
|
||||
href: "https://github.com/anomalyco/opencode",
|
||||
apiHref: "https://api.github.com/repos/anomalyco/opencode",
|
||||
fallbackStars: "208K",
|
||||
fallbackStars: "220K",
|
||||
}
|
||||
export const themePreferences = ["dark", "light", "system"] as const
|
||||
export const themeStorageKey = "opencode:stats-theme"
|
||||
@@ -28,6 +28,7 @@ export const getGitHubStars = query(async () => {
|
||||
headers: {
|
||||
Accept: "application/vnd.github+json",
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
"User-Agent": "opencode-stats",
|
||||
},
|
||||
})
|
||||
.then((response) => (response.ok ? response.json() : undefined))
|
||||
|
||||
Reference in New Issue
Block a user