mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
feat(launch): friendly GitHub-limit message on Generate; document the score formula
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -350,6 +350,13 @@ export default function App() {
|
||||
setGenerateError(body.status === 'not_found' ? 'User not found' : 'Not enrolled')
|
||||
return
|
||||
}
|
||||
if (r.status === 503) {
|
||||
const body = await r.json().catch(() => ({} as { error?: string }))
|
||||
if (body.error === 'github_rate_limited') {
|
||||
setGenerateError("GitHub's API limit is reached for now. Your card builds automatically once it resets (within the hour), and you can paste the embed now.")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!r.ok) {
|
||||
setGenerateError(`Generate failed (HTTP ${r.status})`)
|
||||
return
|
||||
|
||||
@@ -540,6 +540,16 @@ export function WorkshopScreen({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{w.id === 'grade' && (
|
||||
<a
|
||||
href="https://github.com/ShayManor/github-readme-stats#how-the-score-works"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-[10px] text-gray-500 underline"
|
||||
>
|
||||
How the score works
|
||||
</a>
|
||||
)}
|
||||
|
||||
{w.id === 'impact' && (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user