mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
feat(readme): update instructions and add table of contents section
This commit is contained in:
@@ -5,49 +5,183 @@
|
|||||||
|
|
||||||
A single SVG widget you drop into your GitHub profile README. It scores
|
A single SVG widget you drop into your GitHub profile README. It scores
|
||||||
your account, charts your contribution timeline, highlights your top
|
your account, charts your contribution timeline, highlights your top
|
||||||
collaborators, breaks down your languages, and earns you tags like
|
collaborators, breaks down your languages, tracks your commit streaks,
|
||||||
`Backend`, `ML`, or `Founder #42`.
|
and earns you tags like `Backend`, `ML`, or `Founder #42`.
|
||||||
|
|
||||||

|
```md
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Get your widget in 30 seconds
|
|
||||||
|
|
||||||
1. Open `https://gh-stats.com/` in a browser.
|
|
||||||
2. Type your GitHub username and hit **Continue**.
|
|
||||||
3. Pick a theme, reorder widgets, add custom tags / achievements.
|
|
||||||
4. Click **Generate** — the SVG is built on the server and cached.
|
|
||||||
5. Copy the one-liner and paste it into your profile README:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||

|

|
||||||
```
|
```
|
||||||
|
|
||||||
That's it. Every push of GitHub activity is picked up by a 15-minute
|

|
||||||
refresh cron, so the image stays current without you doing anything.
|
|
||||||
|
<details>
|
||||||
|
<summary>Table of contents (click to show)</summary>
|
||||||
|
|
||||||
|
- [Quick start](#quick-start)
|
||||||
|
- [The composite widget](#the-composite-widget)
|
||||||
|
- [Individual widgets](#individual-widgets)
|
||||||
|
- [Grade](#grade)
|
||||||
|
- [Impact timeline](#impact-timeline)
|
||||||
|
- [Streaks](#streaks)
|
||||||
|
- [Top collaborators](#top-collaborators)
|
||||||
|
- [Recent focus](#recent-focus)
|
||||||
|
- [Languages](#languages)
|
||||||
|
- [Achievements](#achievements)
|
||||||
|
- [Themes](#themes)
|
||||||
|
- [Customization via query parameters](#customization-via-query-parameters)
|
||||||
|
- [Refreshing your data](#refreshing-your-data)
|
||||||
|
- [Status states](#status-states)
|
||||||
|
- [Self-hosting](#self-hosting)
|
||||||
|
- [Running tests](#running-tests)
|
||||||
|
- [FAQ](#faq)
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## What's in the widget
|
## Quick start
|
||||||
|
|
||||||
| Widget | What it shows |
|
1. Open <https://gh-stats.com/> in a browser.
|
||||||
|---|---|
|
2. **Sign in with GitHub** — this enrolls your username and makes you the
|
||||||
| **Grade** | Overall score (0–100) + letter grade + top tags |
|
owner of the widget. The editor (Workshop) is only accessible to the
|
||||||
| **Impact Timeline** | Smooth contribution curve over the last 6 months |
|
signed-in owner.
|
||||||
| **Top Collaborators** | Avatars + shared-repo + commit bars |
|
3. Pick a theme, reorder widgets, add custom tags and achievements.
|
||||||
| **Recent Focus** | What you've actually been working on lately |
|
4. Click **Generate** — the SVG is built on the server and cached.
|
||||||
| **Languages** | Your language mix, weighted by active code |
|
5. Copy the one-liner into your profile README:
|
||||||
| **Achievements** | Hand-entered credentials — hackathons, talks, awards |
|
|
||||||
|
|
||||||
Widgets are composed into a single card, or you can embed any one of
|
```md
|
||||||
them on its own — see [Individual widgets](#individual-widgets).
|

|
||||||
|
```
|
||||||
|
|
||||||
|
That's it. A 15-minute refresh cron picks up new GitHub activity, so the
|
||||||
|
image stays current on its own.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The image URL is stable. Once it's in your README, you can change
|
||||||
|
> themes, tags, or widget order in the Workshop without ever touching
|
||||||
|
> the markdown again.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## The composite widget
|
||||||
|
|
||||||
|
The default URL returns a single composed card with every enabled widget
|
||||||
|
stacked in your chosen order.
|
||||||
|
|
||||||
|
Endpoint: `https://gh-stats.com/<username>`
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Only public GitHub activity is counted. Private commits, private
|
||||||
|
> repos, and organization-restricted contributions are not visible to
|
||||||
|
> the fetcher. This applies even on self-hosted deployments — the PAT
|
||||||
|
> only sees what GitHub's public GraphQL/REST endpoints expose.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Individual widgets
|
||||||
|
|
||||||
|
Don't want the full stack? Every widget is independently addressable at
|
||||||
|
`https://gh-stats.com/<username>/<widget>.svg`:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
Put two side-by-side with an HTML table (GitHub strips inline CSS, so a
|
||||||
|
table is the only reliable way):
|
||||||
|
|
||||||
|
```html
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://gh-stats.com/YOUR_USERNAME/grade.svg"/></td>
|
||||||
|
<td><img src="https://gh-stats.com/YOUR_USERNAME/languages.svg"/></td>
|
||||||
|
</tr></table>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Grade
|
||||||
|
|
||||||
|
Overall score (0–100), letter grade (S / A / B / C / D / F), and your
|
||||||
|
top role tags. The grade is a weighted blend of commit volume, review
|
||||||
|
activity, recent authorship, and language breadth — see
|
||||||
|
`generator/src/scoring.py` for the exact formula.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Impact timeline
|
||||||
|
|
||||||
|
A smooth contribution curve over the last 6 months, drawn against a
|
||||||
|
faint grid. Nice on its own, or sitting above a languages card.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Streaks
|
||||||
|
|
||||||
|
Current and longest contribution streak, with a small spark chart.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Top collaborators
|
||||||
|
|
||||||
|
Avatars, shared-repo count, and commit bars for the people you work
|
||||||
|
with most. We filter out huge OSS projects (configurable via
|
||||||
|
`COLLABORATOR_MAX_REPO_SIZE`) so your drive-by PR to `react` doesn't
|
||||||
|
put the React team on your card.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Recent focus
|
||||||
|
|
||||||
|
What you've actually been working on lately, grouped by topic/language
|
||||||
|
cluster.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Languages
|
||||||
|
|
||||||
|
Your language mix, weighted by bytes in **repos you authored** (forks
|
||||||
|
where you haven't contributed meaningfully are ignored). Hide noise
|
||||||
|
like `HTML` or `Makefile` with the `hide` parameter.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Achievements
|
||||||
|
|
||||||
|
Up to 10 hand-entered lines — hackathons, talks, awards, certifications.
|
||||||
|
Each line has an icon (`trophy`, `medal`, `star`, `hackathon`), a
|
||||||
|
title, a subtitle, and an optional date.
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
|
|
||||||
Pass `?theme=<name>` or pick in the Workshop. Five built-ins:
|
Pass `?theme=<name>` or pick one in the Workshop. Five built-ins:
|
||||||
|
|
||||||
| Theme | Tone |
|
| Theme | Tone |
|
||||||
|---|---|
|
|---|---|
|
||||||
@@ -57,140 +191,191 @@ Pass `?theme=<name>` or pick in the Workshop. Five built-ins:
|
|||||||
| `clean` | white, understated |
|
| `clean` | white, understated |
|
||||||
| `paper` | warm off-white |
|
| `paper` | warm off-white |
|
||||||
|
|
||||||
```markdown
|
```md
|
||||||

|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
### Dark / light auto-switching
|
||||||
|
|
||||||
## Individual widgets
|
Use GitHub's built-in theme context suffixes to serve a different image
|
||||||
|
to viewers on dark vs. light GitHub:
|
||||||
|
|
||||||
Don't want the full composite? Embed exactly one:
|
```md
|
||||||
|

|
||||||
```markdown
|

|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
```
|
```
|
||||||
|
|
||||||
Put two side-by-side with an HTML table:
|
Or with `<picture>` for precise `prefers-color-scheme` control:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<table><tr>
|
<picture>
|
||||||
<td><img src="https://gh-stats.com/YOUR_USERNAME/grade.svg"/></td>
|
<source srcset="https://gh-stats.com/YOUR_USERNAME?theme=onyx"
|
||||||
<td><img src="https://gh-stats.com/YOUR_USERNAME/languages.svg"/></td>
|
media="(prefers-color-scheme: dark)" />
|
||||||
</tr></table>
|
<source srcset="https://gh-stats.com/YOUR_USERNAME?theme=clean"
|
||||||
|
media="(prefers-color-scheme: light)" />
|
||||||
|
<img src="https://gh-stats.com/YOUR_USERNAME" />
|
||||||
|
</picture>
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Customization
|
## Customization via query parameters
|
||||||
|
|
||||||
Everything is editable from the Workshop UI — the settings are saved
|
Every widget URL accepts query parameters. They let you override the
|
||||||
against your username, so re-embedding picks them up automatically.
|
owner's saved settings on a per-embed basis **without re-enrolling or
|
||||||
|
signing in** — useful when someone else wants to embed your widget
|
||||||
|
with different options. Nothing is persisted; the owner's widget is
|
||||||
|
unaffected.
|
||||||
|
|
||||||
- **Custom tags** — add role labels like `ML`, `Systems`, `Cloud`. The
|
### Common parameters
|
||||||
grade widget will fit them into its tag cloud.
|
|
||||||
- **Hidden languages** — exclude languages you don't want counted
|
|
||||||
(e.g. `HTML`, `CSS`, `Makefile`).
|
|
||||||
- **Widget colors** — per-widget accent overrides for the impact line
|
|
||||||
and collaborator bars (hex, `#RRGGBB`).
|
|
||||||
- **Widget limits** — cap the number of tags, collaborators, or
|
|
||||||
languages shown.
|
|
||||||
- **Achievements** — up to 10 hand-entered lines with icon
|
|
||||||
(`trophy`, `medal`, `star`, `hackathon`), title, subtitle, and date.
|
|
||||||
|
|
||||||
**Auto-awarded tags** fire from real activity — no way to fake them:
|
| Parameter | Description | Type | Example |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `theme` | Built-in theme name. | enum | `?theme=onyx` |
|
||||||
|
| `widgets` | Which widgets to render (composite only). | csv | `?widgets=grade,languages` |
|
||||||
|
| `order` | Render order (composite only). | csv | `?order=grade,streaks,impact` |
|
||||||
|
| `hide` | Languages to exclude from the languages widget. | csv | `?hide=HTML,CSS,Makefile` |
|
||||||
|
| `tags` | Extra custom role tags to merge into the grade widget. | csv | `?tags=ML,Systems` |
|
||||||
|
| `ach` | Achievements list as url-safe base64(json). | string | see below |
|
||||||
|
|
||||||
- `Founder #N` — one of the first N enrolled users, with your number
|
> [!NOTE]
|
||||||
- (plus anything your languages / topics map to: `Backend`, `Frontend`,
|
> Values with special characters must be URL-encoded. `#a78bfa` becomes
|
||||||
`ML`, `Mobile`, `DevOps`, `Cloud`, …)
|
> `%23a78bfa`; `Jupyter Notebook` becomes `Jupyter%20Notebook`.
|
||||||
|
|
||||||
|
### Per-widget parameters
|
||||||
|
|
||||||
|
Use dot notation: `<widget>.<key>=<value>`.
|
||||||
|
|
||||||
|
| Parameter | Description | Type | Default |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `grade.max_tags` | Max role tags shown on the grade card (1–20). | int | all tags |
|
||||||
|
| `impact.line_color` | Accent color for the contribution curve. | hex color | theme accent |
|
||||||
|
| `streaks.color` | Accent color for the streak bars. | hex color | theme green |
|
||||||
|
| `collaborators.max_count` | Max collaborators shown (1–10). | int | `5` |
|
||||||
|
| `collaborators.bar_color` | Accent color for the commit bars. | hex color | theme accent |
|
||||||
|
| `focus.max_categories` | Max focus clusters shown (1–10). | int | `6` |
|
||||||
|
| `languages.max_languages` | Max languages shown (1–10). | int | `5` |
|
||||||
|
| `achievements.max_items` | Max achievement rows shown (1–10). | int | `5` |
|
||||||
|
|
||||||
|
Example combining several overrides:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Auto-awarded tags
|
||||||
|
|
||||||
|
Some tags on the grade card are earned from real activity — no query
|
||||||
|
parameter will add them if you haven't earned them:
|
||||||
|
|
||||||
|
- `Founder #N` — one of the first N users to enroll. Your number is
|
||||||
|
fixed at enrollment and never changes.
|
||||||
|
- Role tags like `Backend`, `Frontend`, `ML`, `Mobile`, `DevOps`,
|
||||||
|
`Cloud`, `Systems`, `Database`, `Security` — derived from your
|
||||||
|
language mix and repo topics. The mapping lives in
|
||||||
|
`generator/src/config.py` (`TAG_LANGUAGE_MAP`, `TAG_TOPIC_MAP`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Refreshing
|
## Refreshing your data
|
||||||
|
|
||||||
Your data refreshes automatically every 15 minutes. If you just merged
|
The refresh cron re-pulls GitHub data every **15 minutes**, so new
|
||||||
something big and want it to show up immediately, click **Refresh now**
|
commits typically appear in your widget within that window. GitHub's
|
||||||
in the Workshop (one-shot per account; requires the edit token that was
|
image CDN may add another minute or two of staleness on top.
|
||||||
issued to your browser on first visit).
|
|
||||||
|
If you need an immediate update (e.g. right after merging something
|
||||||
|
big), click **Refresh now** in the Workshop. This is a **one-shot per
|
||||||
|
account** — use it when it matters.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Status states
|
## Status states
|
||||||
|
|
||||||
The SVG endpoint advertises its state via the `X-Widget-Status` header:
|
The SVG endpoint advertises its state via the `X-Widget-Status`
|
||||||
|
response header, and the edge cache uses it to decide whether to cache:
|
||||||
|
|
||||||
| Status | Meaning | Your README shows |
|
| Status | Meaning | What the viewer sees |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `ready` | Built and cached | the real widget |
|
| `ready` | Built and cached | the real widget |
|
||||||
| `building` | Enrolled, first render in progress | a placeholder card |
|
| `building` | Enrolled, first render in progress | a placeholder card |
|
||||||
| `rate_limited` | Daily enrollment cap hit | a placeholder card |
|
| `rate_limited` | Daily enrollment cap hit | a placeholder card |
|
||||||
| `not_found` | GitHub username doesn't exist | a 404-style card |
|
| `not_found` | GitHub username doesn't exist | a 404-style card |
|
||||||
|
|
||||||
GitHub caches the image aggressively; if a just-enrolled widget shows
|
GitHub caches images aggressively; a just-enrolled widget may show the
|
||||||
the placeholder for a minute or two, that's expected.
|
placeholder for a minute or two before the real image propagates. This
|
||||||
|
is normal — no action needed on your side.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Self-hosting
|
## Self-hosting
|
||||||
|
|
||||||
If you want your own instance, it runs as three Docker services plus a
|
If you want your own instance, it runs as three Python services plus a
|
||||||
Vite-built React SPA served by the generator. You'll need a GitHub
|
Vite+React SPA served by the generator. You'll need a GitHub Personal
|
||||||
Personal Access Token (classic, `read:user` + `repo:public_repo` is
|
Access Token (classic, `read:user` + `repo:public_repo` is enough) and,
|
||||||
enough).
|
for OAuth-based enrollment, a GitHub OAuth App.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1) fetcher — owns the PAT, talks to GitHub
|
# 1) fetcher — owns the PAT, talks to GitHub (port 5001)
|
||||||
(cd fetcher && pip install -r requirements.txt &&
|
cd fetcher && pip install -r requirements.txt
|
||||||
FETCHER_INTERNAL_TOKEN=dev GITHUB_PAT=<your-pat> python -m src.api) &
|
FETCHER_INTERNAL_TOKEN=dev GITHUB_PAT=<your-pat> python -m src.api &
|
||||||
|
|
||||||
# 2) generator — API + worker + refresh cron
|
# 2) generator — API + worker + refresh cron (port 5002)
|
||||||
cd generator && pip install -r requirements.txt
|
cd ../generator && pip install -r requirements.txt
|
||||||
FETCHER_URL=http://localhost:5001 FETCHER_INTERNAL_TOKEN=dev python -m src.api &
|
export FETCHER_URL=http://localhost:5001
|
||||||
FETCHER_URL=http://localhost:5001 FETCHER_INTERNAL_TOKEN=dev python -m src.worker &
|
export FETCHER_INTERNAL_TOKEN=dev
|
||||||
FETCHER_URL=http://localhost:5001 FETCHER_INTERNAL_TOKEN=dev python -m src.cron &
|
export GH_OAUTH_CLIENT_ID=<client-id>
|
||||||
|
export GH_OAUTH_CLIENT_SECRET=<client-secret>
|
||||||
|
python -m src.api &
|
||||||
|
python -m src.worker &
|
||||||
|
python -m src.cron &
|
||||||
|
|
||||||
# 3) edge — cache-first SVG proxy (this is what you put behind your domain)
|
# 3) edge — cache-first SVG proxy (put this behind your domain) (port 5003)
|
||||||
(cd ../edge && pip install -r requirements.txt &&
|
cd ../edge && pip install -r requirements.txt
|
||||||
GENERATOR_URL=http://localhost:5002 python -m src.api) &
|
GENERATOR_URL=http://localhost:5002 python -m src.api &
|
||||||
|
|
||||||
# 4) frontend (dev only — production builds are baked into the generator image)
|
# 4) frontend (dev only — production builds are baked into the generator image)
|
||||||
cd ../generator/frontend && npm install && npm run dev
|
cd ../generator/frontend && npm install && npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Per-service READMEs cover Docker, tests, and env vars:
|
Each service is independent: a Dockerfile, `requirements.txt`, and
|
||||||
|
`pytest.ini` sit in its directory. The generator image bundles the
|
||||||
- [`fetcher/`](./fetcher/README.md) — port 5001
|
pre-built frontend, so a production deploy is `edge → generator →
|
||||||
- [`generator/`](./generator/README.md) — port 5002
|
fetcher` with one domain pointed at edge.
|
||||||
- [`edge/`](./edge/README.md) — port 5003
|
|
||||||
|
|
||||||
The generator image serves both the API and the pre-built frontend, so
|
|
||||||
after deploying edge + generator + fetcher you can point a domain at
|
|
||||||
the edge and you're done.
|
|
||||||
|
|
||||||
### Capacity knobs
|
### Capacity knobs
|
||||||
|
|
||||||
Sensible defaults; all overridable via env:
|
Sensible defaults out of the box; all overridable via env:
|
||||||
|
|
||||||
| Env | Default | What it bounds |
|
| Env | Default | What it bounds |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `GENERATE_CONCURRENCY` | `2` | Simultaneous SVG renders |
|
| `GENERATE_CONCURRENCY` | `2` | Simultaneous SVG renders |
|
||||||
| `PREFETCH_MAX_WORKERS` | `2` | Background prefetch threads |
|
| `PREFETCH_MAX_WORKERS` | `2` | Background prefetch threads |
|
||||||
| `PENDING_JOB_QUEUE_CAP` | `200` | Build queue depth before new enrolls 429 |
|
| `PENDING_JOB_QUEUE_CAP` | `200` | Build-queue depth before new enrolls 429 |
|
||||||
| `ENROLLMENT_DAILY_CAP` | `50` | New users per day |
|
| `ENROLLMENT_DAILY_CAP` | `50` | New users per day |
|
||||||
| `RATE_LIMIT_READ_MAX` | `3000` per 60s | Per-IP README embeds |
|
| `RATE_LIMIT_READ_MAX` | `3000` per 60s | Per-IP README embeds |
|
||||||
| `RATE_LIMIT_MUTATE_MAX` | `120` per 60s | Per-IP settings edits / generates |
|
| `RATE_LIMIT_MUTATE_MAX` | `120` per 60s | Per-IP settings edits / generates |
|
||||||
| `RATE_LIMIT_ENROLL_MAX` | `60` per 300s | Per-IP new enrollments |
|
| `RATE_LIMIT_ENROLL_MAX` | `60` per 300s | Per-IP new enrollments |
|
||||||
| `EDGE_RATE_LIMIT_MAX` | `3000` per 60s | Per-IP at the edge |
|
| `EDGE_RATE_LIMIT_MAX` | `3000` per 60s | Per-IP at the edge |
|
||||||
|
|
||||||
|
### Required env for OAuth
|
||||||
|
|
||||||
|
| Env | Description |
|
||||||
|
|---|---|
|
||||||
|
| `GH_OAUTH_CLIENT_ID` | GitHub OAuth App client ID |
|
||||||
|
| `GH_OAUTH_CLIENT_SECRET` | GitHub OAuth App client secret |
|
||||||
|
| `GH_OAUTH_REDIRECT_URI` | Callback URL, e.g. `https://gh-stats.com/api/auth/github/callback` |
|
||||||
|
| `GENERATOR_SECRET_KEY` | Flask session signing key (`python -c 'import secrets;print(secrets.token_hex(32))'`) |
|
||||||
|
| `ALLOWED_ORIGINS` | Comma-separated origin allow-list for mutate routes |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Running tests
|
## Running tests
|
||||||
|
|
||||||
|
Each service is self-contained:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
(cd fetcher && pytest) && (cd generator && pytest) && (cd edge && pytest)
|
(cd fetcher && pytest) && (cd generator && pytest) && (cd edge && pytest)
|
||||||
```
|
```
|
||||||
@@ -200,20 +385,52 @@ Sensible defaults; all overridable via env:
|
|||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
**Can I use a private GitHub account?**
|
**Can I use a private GitHub account?**
|
||||||
No — the fetcher only sees public activity. Private repos and private
|
No. The fetcher only reads public activity. Private repos, private
|
||||||
contribution counts aren't included.
|
commit counts, and org-restricted contributions are never included —
|
||||||
|
even on a self-hosted instance, since the public GitHub API doesn't
|
||||||
|
expose them.
|
||||||
|
|
||||||
**How fresh is the data?**
|
**How fresh is the data?**
|
||||||
The refresh cron ticks every 15 minutes. You can also click **Refresh
|
Every 15 minutes via the refresh cron. You can also click **Refresh
|
||||||
now** in the Workshop once per account.
|
now** in the Workshop once per account for an immediate update.
|
||||||
|
|
||||||
**Someone else already enrolled my username — can I edit it?**
|
**How do I edit my widget?**
|
||||||
The first browser to visit your username gets the edit token. If that
|
Sign in with GitHub at <https://gh-stats.com/>. Only the GitHub account
|
||||||
was you but you've lost the token (cleared localStorage, switched
|
that owns the username can edit that widget's settings. There is no
|
||||||
browsers), there's no recovery path today — an OAuth-based reclaim
|
other edit path — the Workshop's mutate routes require both a valid
|
||||||
flow is on the roadmap.
|
session cookie and a matching login.
|
||||||
|
|
||||||
|
**Someone else's username is already showing on the site — can I claim it?**
|
||||||
|
Yes. Enrollment happens implicitly on first GitHub sign-in: the first
|
||||||
|
time the owner of a username signs in, their settings row is created
|
||||||
|
(or taken over, if it was auto-enrolled by a previous viewer). No
|
||||||
|
manual claim step is needed.
|
||||||
|
|
||||||
**Can I change the widget without re-embedding?**
|
**Can I change the widget without re-embedding?**
|
||||||
Yes. The image URL is stable. Edit settings in the Workshop, click
|
Yes. The image URL is stable. Edit settings in the Workshop, click
|
||||||
Generate, and the next time the image is fetched it's the new version
|
**Generate**, and the next fetch serves the new version. GitHub's
|
||||||
(GitHub's image cache may delay that by a few minutes).
|
image cache may delay propagation by a few minutes.
|
||||||
|
|
||||||
|
**Can I embed someone else's widget with my own theme / filters?**
|
||||||
|
Yes — use [query parameters](#customization-via-query-parameters). The
|
||||||
|
owner's stored settings are unaffected; the override render is
|
||||||
|
computed on demand and cached briefly.
|
||||||
|
|
||||||
|
**I'm getting a placeholder card. What's wrong?**
|
||||||
|
Check the `X-Widget-Status` header on the response (`curl -I
|
||||||
|
https://gh-stats.com/<username>`). `building` means first render is in
|
||||||
|
progress — wait a minute. `rate_limited` means the daily enrollment
|
||||||
|
cap was hit — try tomorrow. `not_found` means GitHub doesn't know
|
||||||
|
that username.
|
||||||
|
|
||||||
|
**Why does my `Languages` card look wrong?**
|
||||||
|
The languages widget only counts repos you authored, weighted by
|
||||||
|
bytes. Forks where you haven't made enough commits are excluded (see
|
||||||
|
`FORK_MIN_COMMITS`). Add `?hide=HTML,CSS,Makefile` if stock-generated
|
||||||
|
files are dominating the breakdown.
|
||||||
|
|
||||||
|
**Does the public instance work for high-traffic profiles?**
|
||||||
|
It's best-effort. The public instance at `gh-stats.com` runs on a
|
||||||
|
single mini PC, and the capacity knobs above are tuned for that. If
|
||||||
|
your profile gets heavy traffic, self-host — the edge cache in front
|
||||||
|
of the generator scales the read path almost for free.
|
||||||
|
|||||||
Reference in New Issue
Block a user