diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index df1f422f..8250d00f 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -27,8 +27,8 @@ jobs: go-version: "1.26" cache: true - - name: Build ghstats - run: go build -trimpath -ldflags="-s -w" -o ghstats . + - name: Build ghglance + run: go build -trimpath -ldflags="-s -w" -o ghglance . - name: Render every card for every theme env: @@ -36,7 +36,7 @@ jobs: run: | rm -rf demo mkdir -p demo - ./ghstats \ + ./ghglance \ -user "${{ github.repository_owner }}" \ -themes all \ -tz Asia/Saigon \ @@ -49,11 +49,11 @@ jobs: OWNER: ${{ github.repository_owner }} REPO: ${{ github.repository }} run: | - themes=$(./ghstats -list-themes) + themes=$(./ghglance -list-themes) # Lightweight index so readers don't have to load ~975 images at once. { - echo "# ghstats demo gallery" + echo "# ghglance demo gallery" echo echo "Every card rendered for [\`$OWNER\`](https://github.com/$OWNER) in every supported theme. Click a theme to open its gallery page — each page embeds 16 SVGs, so only the theme you're reviewing is fetched." echo @@ -87,7 +87,7 @@ jobs: printf '\n' } { - printf '# ghstats — %s\n\n' "$theme" + printf '# ghglance — %s\n\n' "$theme" printf '[← back to index](../README.md)\n\n' printf 'Rendered for [`%s`](https://github.com/%s). 16 SVGs laid out to ' "$OWNER" "$OWNER" printf 'match the author profile README table.\n\n' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26320376..64529831 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,22 +79,22 @@ jobs: GOARCH: ${{ matrix.goarch }} CGO_ENABLED: "0" run: | - bin=ghstats - [ "$GOOS" = windows ] && bin=ghstats.exe + bin=ghglance + [ "$GOOS" = windows ] && bin=ghglance.exe mkdir -p dist go build -trimpath -ldflags="-s -w" -o "dist/$bin" . cd dist if [ "$GOOS" = windows ]; then - zip "ghstats_${GOOS}_${GOARCH}.zip" "$bin" + zip "ghglance_${GOOS}_${GOARCH}.zip" "$bin" else - tar -czf "ghstats_${GOOS}_${GOARCH}.tar.gz" "$bin" + tar -czf "ghglance_${GOOS}_${GOARCH}.tar.gz" "$bin" fi - uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 with: - files: dist/ghstats_*.* + files: dist/ghglance_*.* # Move the floating major-version tag (e.g. v1) to this release's commit so - # consumers using `uses: tiennm99/ghstats@v1` automatically pick up each new + # consumers using `uses: tiennm99/ghglance@v1` automatically pick up each new # minor/patch release. Force-push is expected here — that's the point of a # floating tag. update-major-tag: diff --git a/CLAUDE.md b/CLAUDE.md index f7e783b7..4f32b4a2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# ghstats +# ghglance Single-binary Go CLI that renders GitHub profile cards as SVG, wrapped by a published GitHub Action. `main.go` parses flags → `internal/github` fetches → @@ -15,7 +15,7 @@ them ships a half-wired feature or a README that lies: 3. `entrypoint.sh` — the `INPUT_*` → flag translation 4. `README.md` — **both** reference tables (Action inputs, CLI flags) **and the runnable examples**: the workflow YAML under "Use as a GitHub Action" - and the `ghstats …` command under "Use as a CLI" + and the `ghglance …` command under "Use as a CLI" 5. `docs/system-architecture.md` — when the knob changes the fetch pipeline or its query cost diff --git a/Dockerfile b/Dockerfile index 3cce60e9..4386fde7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,11 @@ WORKDIR /src COPY go.mod ./ RUN go mod download || true COPY . . -RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/ghstats . +RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/ghglance . FROM alpine:3.21@sha256:48b0309ca019d89d40f670aa1bc06e426dc0931948452e8491e3d65087abc07d RUN apk add --no-cache ca-certificates tzdata git -COPY --from=build /out/ghstats /usr/local/bin/ghstats +COPY --from=build /out/ghglance /usr/local/bin/ghglance COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md index 8d6f2fbe..8f40bad2 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# ghstats +# ghglance > Generate SVG cards summarizing a GitHub user's profile — written in Go. -[![Marketplace](https://img.shields.io/badge/Marketplace-ghstats-2f81f7?logo=github)](https://github.com/marketplace/actions/ghstats) -[![Release](https://img.shields.io/github/v/release/tiennm99/ghstats?color=blue)](https://github.com/tiennm99/ghstats/releases/latest) -[![License](https://img.shields.io/github/license/tiennm99/ghstats?color=green)](./LICENSE) +[![Marketplace](https://img.shields.io/badge/Marketplace-ghglance-2f81f7?logo=github)](https://github.com/marketplace/actions/ghglance) +[![Release](https://img.shields.io/github/v/release/tiennm99/ghglance?color=blue)](https://github.com/tiennm99/ghglance/releases/latest) +[![License](https://img.shields.io/github/license/tiennm99/ghglance?color=green)](./LICENSE) -`ghstats` is a single-binary CLI (and a GitHub Action wrapping it) that fetches +`ghglance` is a single-binary CLI (and a GitHub Action wrapping it) that fetches data for a GitHub user and writes a themed set of SVGs you can embed in your profile README. -Marketplace listing: **[ghstats](https://github.com/marketplace/actions/ghstats)** · Source: [`tiennm99/ghstats`](https://github.com/tiennm99/ghstats) +Marketplace listing: **[ghglance](https://github.com/marketplace/actions/ghglance)** · Source: [`tiennm99/ghglance`](https://github.com/tiennm99/ghglance) Cards rendered: @@ -55,15 +55,15 @@ Live render against the author's profile, committed by [`.github/workflows/demo. ## In the wild -- [**tiennm99/tiennm99**](https://github.com/tiennm99/tiennm99) — author's profile README, refreshed daily via `tiennm99/ghstats@v1`. Two-per-row layout, dracula theme. +- [**tiennm99/tiennm99**](https://github.com/tiennm99/tiennm99) — author's profile README, refreshed daily via `tiennm99/ghglance@v1`. Two-per-row layout, dracula theme. ## Use as a GitHub Action (recommended) -Drop this in `.github/workflows/ghstats.yml` in your **profile repo** (the one +Drop this in `.github/workflows/ghglance.yml` in your **profile repo** (the one named after your username): ```yaml -name: ghstats +name: ghglance on: schedule: @@ -78,10 +78,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: tiennm99/ghstats@v1 + - uses: tiennm99/ghglance@v1 with: user: ${{ github.repository_owner }} - token: ${{ secrets.GHSTATS_TOKEN }} # classic PAT with read:user + repo + token: ${{ secrets.GHGLANCE_TOKEN }} # classic PAT with read:user + repo themes: dracula,github_dark,tokyonight tz: Asia/Saigon include_forks: "true" @@ -127,7 +127,7 @@ Then embed the cards in your `README.md`: | `include_private` | `true` | Include private repos (requires PAT with `repo` scope; silently no-op otherwise) | | `include_org_repos`| `false` | Count org-owned repos you administer toward stars, repo count, languages, top-starred (needs `read:org`) | | `commit_changes` | `false` | Commit generated cards back to the repo | -| `commit_message` | `chore: update ghstats cards` | Commit message | +| `commit_message` | `chore: update ghglance cards` | Commit message | | `commit_branch` | *(current ref)* | Target branch for auto-commit | | `author_name` | `github-actions[bot]` | Commit author | | `author_email` | `…@users.noreply.github.com` | Commit email | @@ -135,28 +135,28 @@ Then embed the cards in your `README.md`: ## Use as a CLI ```sh -go install github.com/tiennm99/ghstats@latest +go install github.com/tiennm99/ghglance@latest ``` Or build from source: ```sh -git clone https://github.com/tiennm99/ghstats -cd ghstats -go build -o ghstats . +git clone https://github.com/tiennm99/ghglance +cd ghglance +go build -o ghglance . ``` Then: ```sh export GITHUB_TOKEN=ghp_xxx -ghstats -user tiennm99 -themes dracula,github_dark -tz Asia/Saigon -out output +ghglance -user tiennm99 -themes dracula,github_dark -tz Asia/Saigon -out output ``` Add `-include-org-repos` to also count org-owned repos you administer: ```sh -ghstats -user tiennm99 -themes dracula -include-org-repos -out output +ghglance -user tiennm99 -themes dracula -include-org-repos -out output ``` | Flag | Default | Description | @@ -191,7 +191,7 @@ ghstats -user tiennm99 -themes dracula -include-org-repos -out output ## Themes -Run `ghstats -list-themes` for the full list (65 themes ported from +Run `ghglance -list-themes` for the full list (65 themes ported from github-profile-summary-cards). Built-ins include `default`, `dark`, `dracula`, `github`, `github_dark`, `tokyonight`, `onedark`, `nord_dark`, `nord_bright`, `gruvbox`, `radical`, `synthwave`, `monokai`, `solarized`, `solarized_dark`, @@ -230,7 +230,7 @@ reference render of every card in every theme, see the CI-built The default `${{ github.token }}` can read public user data but will not see your private-repo commits. For accurate stats, create a **classic** personal access token with `read:user` and `repo`, save it as a repo secret (e.g. -`GHSTATS_TOKEN`), and pass it via the `token` input. `include_private` +`GHGLANCE_TOKEN`), and pass it via the `token` input. `include_private` defaults to `true` so those commits are counted automatically once the token has `repo` scope; pass `include_private: "false"` if you want to keep private work out of the rendered cards even when the token can see it. diff --git a/action.yml b/action.yml index fc3a026b..4e6da33f 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: ghstats +name: ghglance description: Generate GitHub profile summary SVG cards (profile, languages, stats, productive time, contributions) author: tiennm99 branding: @@ -61,7 +61,7 @@ inputs: commit_message: description: Commit message used when commit_changes is true required: false - default: "chore: update ghstats cards" + default: "chore: update ghglance cards" commit_branch: description: Branch to commit to (defaults to the current ref) required: false diff --git a/demo/2077/README.md b/demo/2077/README.md index d5ee2452..3f044bf6 100644 --- a/demo/2077/README.md +++ b/demo/2077/README.md @@ -1,4 +1,4 @@ -# ghstats — 2077 +# ghglance — 2077 [← back to index](../README.md) diff --git a/demo/README.md b/demo/README.md index 1f17ca74..48aad2ad 100644 --- a/demo/README.md +++ b/demo/README.md @@ -1,4 +1,4 @@ -# ghstats demo gallery +# ghglance demo gallery Every card rendered for [`tiennm99`](https://github.com/tiennm99) in every supported theme. Click a theme to open its gallery page — each page embeds 16 SVGs, so only the theme you're reviewing is fetched. diff --git a/demo/algolia/README.md b/demo/algolia/README.md index f63075df..e94980f1 100644 --- a/demo/algolia/README.md +++ b/demo/algolia/README.md @@ -1,4 +1,4 @@ -# ghstats — algolia +# ghglance — algolia [← back to index](../README.md) diff --git a/demo/apprentice/README.md b/demo/apprentice/README.md index ed172a5d..0002ad4a 100644 --- a/demo/apprentice/README.md +++ b/demo/apprentice/README.md @@ -1,4 +1,4 @@ -# ghstats — apprentice +# ghglance — apprentice [← back to index](../README.md) diff --git a/demo/aura/README.md b/demo/aura/README.md index fb8a125f..2d2677e0 100644 --- a/demo/aura/README.md +++ b/demo/aura/README.md @@ -1,4 +1,4 @@ -# ghstats — aura +# ghglance — aura [← back to index](../README.md) diff --git a/demo/aura_dark/README.md b/demo/aura_dark/README.md index 2edc2310..b7e83716 100644 --- a/demo/aura_dark/README.md +++ b/demo/aura_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — aura_dark +# ghglance — aura_dark [← back to index](../README.md) diff --git a/demo/ayu_mirage/README.md b/demo/ayu_mirage/README.md index 0b5d52c7..1b21d4f1 100644 --- a/demo/ayu_mirage/README.md +++ b/demo/ayu_mirage/README.md @@ -1,4 +1,4 @@ -# ghstats — ayu_mirage +# ghglance — ayu_mirage [← back to index](../README.md) diff --git a/demo/bear/README.md b/demo/bear/README.md index bed81f03..15cfc89a 100644 --- a/demo/bear/README.md +++ b/demo/bear/README.md @@ -1,4 +1,4 @@ -# ghstats — bear +# ghglance — bear [← back to index](../README.md) diff --git a/demo/blue_green/README.md b/demo/blue_green/README.md index 9429ac91..c3ef2819 100644 --- a/demo/blue_green/README.md +++ b/demo/blue_green/README.md @@ -1,4 +1,4 @@ -# ghstats — blue_green +# ghglance — blue_green [← back to index](../README.md) diff --git a/demo/blueberry/README.md b/demo/blueberry/README.md index 62e6e8da..fa6b1eb3 100644 --- a/demo/blueberry/README.md +++ b/demo/blueberry/README.md @@ -1,4 +1,4 @@ -# ghstats — blueberry +# ghglance — blueberry [← back to index](../README.md) diff --git a/demo/buefy/README.md b/demo/buefy/README.md index 5beddd7a..f93b3298 100644 --- a/demo/buefy/README.md +++ b/demo/buefy/README.md @@ -1,4 +1,4 @@ -# ghstats — buefy +# ghglance — buefy [← back to index](../README.md) diff --git a/demo/calm/README.md b/demo/calm/README.md index 52a24490..84cdd13a 100644 --- a/demo/calm/README.md +++ b/demo/calm/README.md @@ -1,4 +1,4 @@ -# ghstats — calm +# ghglance — calm [← back to index](../README.md) diff --git a/demo/chartreuse_dark/README.md b/demo/chartreuse_dark/README.md index 368460f8..8e63ba84 100644 --- a/demo/chartreuse_dark/README.md +++ b/demo/chartreuse_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — chartreuse_dark +# ghglance — chartreuse_dark [← back to index](../README.md) diff --git a/demo/city_lights/README.md b/demo/city_lights/README.md index 4ea69f61..9fd8bdf6 100644 --- a/demo/city_lights/README.md +++ b/demo/city_lights/README.md @@ -1,4 +1,4 @@ -# ghstats — city_lights +# ghglance — city_lights [← back to index](../README.md) diff --git a/demo/cobalt/README.md b/demo/cobalt/README.md index 38358cc1..d4eae8d2 100644 --- a/demo/cobalt/README.md +++ b/demo/cobalt/README.md @@ -1,4 +1,4 @@ -# ghstats — cobalt +# ghglance — cobalt [← back to index](../README.md) diff --git a/demo/cobalt2/README.md b/demo/cobalt2/README.md index b3f7b851..9849f5df 100644 --- a/demo/cobalt2/README.md +++ b/demo/cobalt2/README.md @@ -1,4 +1,4 @@ -# ghstats — cobalt2 +# ghglance — cobalt2 [← back to index](../README.md) diff --git a/demo/codeSTACKr/README.md b/demo/codeSTACKr/README.md index 0544b482..4af28ac4 100644 --- a/demo/codeSTACKr/README.md +++ b/demo/codeSTACKr/README.md @@ -1,4 +1,4 @@ -# ghstats — codeSTACKr +# ghglance — codeSTACKr [← back to index](../README.md) diff --git a/demo/darcula/README.md b/demo/darcula/README.md index 8a6982a1..cd8a2c52 100644 --- a/demo/darcula/README.md +++ b/demo/darcula/README.md @@ -1,4 +1,4 @@ -# ghstats — darcula +# ghglance — darcula [← back to index](../README.md) diff --git a/demo/dark/README.md b/demo/dark/README.md index 2edd270b..c6b1558e 100644 --- a/demo/dark/README.md +++ b/demo/dark/README.md @@ -1,4 +1,4 @@ -# ghstats — dark +# ghglance — dark [← back to index](../README.md) diff --git a/demo/date_night/README.md b/demo/date_night/README.md index 49538ce5..b8fcf1ef 100644 --- a/demo/date_night/README.md +++ b/demo/date_night/README.md @@ -1,4 +1,4 @@ -# ghstats — date_night +# ghglance — date_night [← back to index](../README.md) diff --git a/demo/default/README.md b/demo/default/README.md index cd29b155..848b8fc7 100644 --- a/demo/default/README.md +++ b/demo/default/README.md @@ -1,4 +1,4 @@ -# ghstats — default +# ghglance — default [← back to index](../README.md) diff --git a/demo/discord_old_blurple/README.md b/demo/discord_old_blurple/README.md index c347a7ed..fbcb24a7 100644 --- a/demo/discord_old_blurple/README.md +++ b/demo/discord_old_blurple/README.md @@ -1,4 +1,4 @@ -# ghstats — discord_old_blurple +# ghglance — discord_old_blurple [← back to index](../README.md) diff --git a/demo/dracula/README.md b/demo/dracula/README.md index 209d4608..7d61fc26 100644 --- a/demo/dracula/README.md +++ b/demo/dracula/README.md @@ -1,4 +1,4 @@ -# ghstats — dracula +# ghglance — dracula [← back to index](../README.md) diff --git a/demo/flag_india/README.md b/demo/flag_india/README.md index 8cf96936..16cc07c1 100644 --- a/demo/flag_india/README.md +++ b/demo/flag_india/README.md @@ -1,4 +1,4 @@ -# ghstats — flag_india +# ghglance — flag_india [← back to index](../README.md) diff --git a/demo/github/README.md b/demo/github/README.md index a8c7d5cd..cb7012ef 100644 --- a/demo/github/README.md +++ b/demo/github/README.md @@ -1,4 +1,4 @@ -# ghstats — github +# ghglance — github [← back to index](../README.md) diff --git a/demo/github_dark/README.md b/demo/github_dark/README.md index 82b8583d..861a7f12 100644 --- a/demo/github_dark/README.md +++ b/demo/github_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — github_dark +# ghglance — github_dark [← back to index](../README.md) diff --git a/demo/gotham/README.md b/demo/gotham/README.md index c538bfdb..907af272 100644 --- a/demo/gotham/README.md +++ b/demo/gotham/README.md @@ -1,4 +1,4 @@ -# ghstats — gotham +# ghglance — gotham [← back to index](../README.md) diff --git a/demo/graywhite/README.md b/demo/graywhite/README.md index 1dc743d7..aef49740 100644 --- a/demo/graywhite/README.md +++ b/demo/graywhite/README.md @@ -1,4 +1,4 @@ -# ghstats — graywhite +# ghglance — graywhite [← back to index](../README.md) diff --git a/demo/great_gatsby/README.md b/demo/great_gatsby/README.md index d2e60a20..5b2fa56a 100644 --- a/demo/great_gatsby/README.md +++ b/demo/great_gatsby/README.md @@ -1,4 +1,4 @@ -# ghstats — great_gatsby +# ghglance — great_gatsby [← back to index](../README.md) diff --git a/demo/gruvbox/README.md b/demo/gruvbox/README.md index 7cfb9a53..20d7a74c 100644 --- a/demo/gruvbox/README.md +++ b/demo/gruvbox/README.md @@ -1,4 +1,4 @@ -# ghstats — gruvbox +# ghglance — gruvbox [← back to index](../README.md) diff --git a/demo/highcontrast/README.md b/demo/highcontrast/README.md index 3ca967f0..b405de73 100644 --- a/demo/highcontrast/README.md +++ b/demo/highcontrast/README.md @@ -1,4 +1,4 @@ -# ghstats — highcontrast +# ghglance — highcontrast [← back to index](../README.md) diff --git a/demo/holi/README.md b/demo/holi/README.md index 5fdbd3cf..b0f4d7de 100644 --- a/demo/holi/README.md +++ b/demo/holi/README.md @@ -1,4 +1,4 @@ -# ghstats — holi +# ghglance — holi [← back to index](../README.md) diff --git a/demo/jolly/README.md b/demo/jolly/README.md index 216fd979..bee81506 100644 --- a/demo/jolly/README.md +++ b/demo/jolly/README.md @@ -1,4 +1,4 @@ -# ghstats — jolly +# ghglance — jolly [← back to index](../README.md) diff --git a/demo/kacho_ga/README.md b/demo/kacho_ga/README.md index 78b874f4..6f687fe7 100644 --- a/demo/kacho_ga/README.md +++ b/demo/kacho_ga/README.md @@ -1,4 +1,4 @@ -# ghstats — kacho_ga +# ghglance — kacho_ga [← back to index](../README.md) diff --git a/demo/maroongold/README.md b/demo/maroongold/README.md index aa3a7fe3..54d86a7d 100644 --- a/demo/maroongold/README.md +++ b/demo/maroongold/README.md @@ -1,4 +1,4 @@ -# ghstats — maroongold +# ghglance — maroongold [← back to index](../README.md) diff --git a/demo/material_palenight/README.md b/demo/material_palenight/README.md index 5cabd6b4..92d72764 100644 --- a/demo/material_palenight/README.md +++ b/demo/material_palenight/README.md @@ -1,4 +1,4 @@ -# ghstats — material_palenight +# ghglance — material_palenight [← back to index](../README.md) diff --git a/demo/merko/README.md b/demo/merko/README.md index d1f355d4..787716ed 100644 --- a/demo/merko/README.md +++ b/demo/merko/README.md @@ -1,4 +1,4 @@ -# ghstats — merko +# ghglance — merko [← back to index](../README.md) diff --git a/demo/midnight_purple/README.md b/demo/midnight_purple/README.md index 28c58cbd..e61d0e53 100644 --- a/demo/midnight_purple/README.md +++ b/demo/midnight_purple/README.md @@ -1,4 +1,4 @@ -# ghstats — midnight_purple +# ghglance — midnight_purple [← back to index](../README.md) diff --git a/demo/moltack/README.md b/demo/moltack/README.md index 523ebe4b..a25dce09 100644 --- a/demo/moltack/README.md +++ b/demo/moltack/README.md @@ -1,4 +1,4 @@ -# ghstats — moltack +# ghglance — moltack [← back to index](../README.md) diff --git a/demo/monokai/README.md b/demo/monokai/README.md index 19ffba20..4413f4cf 100644 --- a/demo/monokai/README.md +++ b/demo/monokai/README.md @@ -1,4 +1,4 @@ -# ghstats — monokai +# ghglance — monokai [← back to index](../README.md) diff --git a/demo/moonlight/README.md b/demo/moonlight/README.md index 970cfc85..0179f9df 100644 --- a/demo/moonlight/README.md +++ b/demo/moonlight/README.md @@ -1,4 +1,4 @@ -# ghstats — moonlight +# ghglance — moonlight [← back to index](../README.md) diff --git a/demo/nightowl/README.md b/demo/nightowl/README.md index 9fad7680..0e4283fc 100644 --- a/demo/nightowl/README.md +++ b/demo/nightowl/README.md @@ -1,4 +1,4 @@ -# ghstats — nightowl +# ghglance — nightowl [← back to index](../README.md) diff --git a/demo/noctis_minimus/README.md b/demo/noctis_minimus/README.md index 0cde97f2..a05145f2 100644 --- a/demo/noctis_minimus/README.md +++ b/demo/noctis_minimus/README.md @@ -1,4 +1,4 @@ -# ghstats — noctis_minimus +# ghglance — noctis_minimus [← back to index](../README.md) diff --git a/demo/nord_bright/README.md b/demo/nord_bright/README.md index dbe56ab9..7fa1ca02 100644 --- a/demo/nord_bright/README.md +++ b/demo/nord_bright/README.md @@ -1,4 +1,4 @@ -# ghstats — nord_bright +# ghglance — nord_bright [← back to index](../README.md) diff --git a/demo/nord_dark/README.md b/demo/nord_dark/README.md index ffd28779..e3e8520c 100644 --- a/demo/nord_dark/README.md +++ b/demo/nord_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — nord_dark +# ghglance — nord_dark [← back to index](../README.md) diff --git a/demo/ocean_dark/README.md b/demo/ocean_dark/README.md index 369460fe..8449c4ea 100644 --- a/demo/ocean_dark/README.md +++ b/demo/ocean_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — ocean_dark +# ghglance — ocean_dark [← back to index](../README.md) diff --git a/demo/omni/README.md b/demo/omni/README.md index 56e9977d..5722f4eb 100644 --- a/demo/omni/README.md +++ b/demo/omni/README.md @@ -1,4 +1,4 @@ -# ghstats — omni +# ghglance — omni [← back to index](../README.md) diff --git a/demo/onedark/README.md b/demo/onedark/README.md index 771fa426..5d7bd032 100644 --- a/demo/onedark/README.md +++ b/demo/onedark/README.md @@ -1,4 +1,4 @@ -# ghstats — onedark +# ghglance — onedark [← back to index](../README.md) diff --git a/demo/outrun/README.md b/demo/outrun/README.md index 86913908..edfc03e9 100644 --- a/demo/outrun/README.md +++ b/demo/outrun/README.md @@ -1,4 +1,4 @@ -# ghstats — outrun +# ghglance — outrun [← back to index](../README.md) diff --git a/demo/panda/README.md b/demo/panda/README.md index c8d4b80b..ab7a9100 100644 --- a/demo/panda/README.md +++ b/demo/panda/README.md @@ -1,4 +1,4 @@ -# ghstats — panda +# ghglance — panda [← back to index](../README.md) diff --git a/demo/prussian/README.md b/demo/prussian/README.md index 79101f60..a4d9fff6 100644 --- a/demo/prussian/README.md +++ b/demo/prussian/README.md @@ -1,4 +1,4 @@ -# ghstats — prussian +# ghglance — prussian [← back to index](../README.md) diff --git a/demo/radical/README.md b/demo/radical/README.md index 8a0b55d2..ae78d212 100644 --- a/demo/radical/README.md +++ b/demo/radical/README.md @@ -1,4 +1,4 @@ -# ghstats — radical +# ghglance — radical [← back to index](../README.md) diff --git a/demo/react/README.md b/demo/react/README.md index 3d290816..e0d2f920 100644 --- a/demo/react/README.md +++ b/demo/react/README.md @@ -1,4 +1,4 @@ -# ghstats — react +# ghglance — react [← back to index](../README.md) diff --git a/demo/rose_pine/README.md b/demo/rose_pine/README.md index e9cbd923..37db6802 100644 --- a/demo/rose_pine/README.md +++ b/demo/rose_pine/README.md @@ -1,4 +1,4 @@ -# ghstats — rose_pine +# ghglance — rose_pine [← back to index](../README.md) diff --git a/demo/shades_of_purple/README.md b/demo/shades_of_purple/README.md index df1f72a5..b46e8433 100644 --- a/demo/shades_of_purple/README.md +++ b/demo/shades_of_purple/README.md @@ -1,4 +1,4 @@ -# ghstats — shades_of_purple +# ghglance — shades_of_purple [← back to index](../README.md) diff --git a/demo/slateorange/README.md b/demo/slateorange/README.md index f261271a..449c9127 100644 --- a/demo/slateorange/README.md +++ b/demo/slateorange/README.md @@ -1,4 +1,4 @@ -# ghstats — slateorange +# ghglance — slateorange [← back to index](../README.md) diff --git a/demo/solarized/README.md b/demo/solarized/README.md index da3b6056..8cab58fd 100644 --- a/demo/solarized/README.md +++ b/demo/solarized/README.md @@ -1,4 +1,4 @@ -# ghstats — solarized +# ghglance — solarized [← back to index](../README.md) diff --git a/demo/solarized_dark/README.md b/demo/solarized_dark/README.md index fe1a2adf..a188116e 100644 --- a/demo/solarized_dark/README.md +++ b/demo/solarized_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — solarized_dark +# ghglance — solarized_dark [← back to index](../README.md) diff --git a/demo/swift/README.md b/demo/swift/README.md index 3b940311..094d96b1 100644 --- a/demo/swift/README.md +++ b/demo/swift/README.md @@ -1,4 +1,4 @@ -# ghstats — swift +# ghglance — swift [← back to index](../README.md) diff --git a/demo/synthwave/README.md b/demo/synthwave/README.md index 61885b6f..265456e0 100644 --- a/demo/synthwave/README.md +++ b/demo/synthwave/README.md @@ -1,4 +1,4 @@ -# ghstats — synthwave +# ghglance — synthwave [← back to index](../README.md) diff --git a/demo/tokyonight/README.md b/demo/tokyonight/README.md index c0a29acf..6d3d0452 100644 --- a/demo/tokyonight/README.md +++ b/demo/tokyonight/README.md @@ -1,4 +1,4 @@ -# ghstats — tokyonight +# ghglance — tokyonight [← back to index](../README.md) diff --git a/demo/transparent/README.md b/demo/transparent/README.md index 076b2d22..c464da1f 100644 --- a/demo/transparent/README.md +++ b/demo/transparent/README.md @@ -1,4 +1,4 @@ -# ghstats — transparent +# ghglance — transparent [← back to index](../README.md) diff --git a/demo/vision_friendly_dark/README.md b/demo/vision_friendly_dark/README.md index cf7b21e3..7f56daee 100644 --- a/demo/vision_friendly_dark/README.md +++ b/demo/vision_friendly_dark/README.md @@ -1,4 +1,4 @@ -# ghstats — vision_friendly_dark +# ghglance — vision_friendly_dark [← back to index](../README.md) diff --git a/demo/vue/README.md b/demo/vue/README.md index d95b9d4e..030a0734 100644 --- a/demo/vue/README.md +++ b/demo/vue/README.md @@ -1,4 +1,4 @@ -# ghstats — vue +# ghglance — vue [← back to index](../README.md) diff --git a/demo/yeblu/README.md b/demo/yeblu/README.md index f4348aeb..af5a3b15 100644 --- a/demo/yeblu/README.md +++ b/demo/yeblu/README.md @@ -1,4 +1,4 @@ -# ghstats — yeblu +# ghglance — yeblu [← back to index](../README.md) diff --git a/demo/zenburn/README.md b/demo/zenburn/README.md index 9ec2351d..d825c062 100644 --- a/demo/zenburn/README.md +++ b/demo/zenburn/README.md @@ -1,4 +1,4 @@ -# ghstats — zenburn +# ghglance — zenburn [← back to index](../README.md) diff --git a/docs/code-standards.md b/docs/code-standards.md index 701308e9..c79f19ce 100644 --- a/docs/code-standards.md +++ b/docs/code-standards.md @@ -66,7 +66,7 @@ Never write comments that describe what well-named code does (`// increment coun ## Testing - Unit tests in the same package, no mocking of http.Client — we test rendering and pure helpers. -- Network tests are omitted; integration verification is manual (`./ghstats -token ...`). +- Network tests are omitted; integration verification is manual (`./ghglance -token ...`). - `go vet ./...` clean before every commit. ## Commit conventions diff --git a/docs/codebase-summary.md b/docs/codebase-summary.md index 0e6d15b1..5f5d694f 100644 --- a/docs/codebase-summary.md +++ b/docs/codebase-summary.md @@ -3,7 +3,7 @@ ## Layout ``` -ghstats/ +ghglance/ ├── main.go # CLI entry point; wires flags → fetchers → renderers ├── action.yml # GitHub Action metadata ├── entrypoint.sh # Action runtime; maps INPUT_* env → CLI flags diff --git a/docs/deployment-guide.md b/docs/deployment-guide.md index c922b28a..4786811c 100644 --- a/docs/deployment-guide.md +++ b/docs/deployment-guide.md @@ -6,10 +6,10 @@ Three consumption paths: **GitHub Action**, **prebuilt binaries**, **go install* ### Workflow template -File: `.github/workflows/ghstats.yml` in your profile repo. +File: `.github/workflows/ghglance.yml` in your profile repo. ```yaml -name: ghstats +name: ghglance on: schedule: @@ -24,10 +24,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: tiennm99/ghstats@v1 + - uses: tiennm99/ghglance@v1 with: user: ${{ github.repository_owner }} - token: ${{ secrets.GHSTATS_TOKEN }} + token: ${{ secrets.GHGLANCE_TOKEN }} themes: dracula,github_dark,tokyonight tz: Asia/Saigon # start_of_week: monday # optional; default sunday — rotates heatmap rows + weekday bars @@ -38,7 +38,7 @@ jobs: ### Required secrets -`GHSTATS_TOKEN`: a **classic** personal access token with at minimum: +`GHGLANCE_TOKEN`: a **classic** personal access token with at minimum: | Scope | Needed for | | --- | --- | @@ -47,7 +47,7 @@ jobs: Fine-grained PATs and the default `${{ github.token }}` lack the introspection scope for contribution calendars in many orgs, so a classic PAT is recommended. -Create one at → "Generate new token (classic)" → select `read:user` (+ `repo` if needed) → save as repo secret `GHSTATS_TOKEN`. +Create one at → "Generate new token (classic)" → select `read:user` (+ `repo` if needed) → save as repo secret `GHGLANCE_TOKEN`. ### Embedding in README @@ -84,29 +84,29 @@ Install: ```sh # Linux x86_64 example -curl -L https://github.com/tiennm99/ghstats/releases/latest/download/ghstats_linux_amd64.tar.gz \ +curl -L https://github.com/tiennm99/ghglance/releases/latest/download/ghglance_linux_amd64.tar.gz \ | tar xz -./ghstats -user YOUR_USERNAME +./ghglance -user YOUR_USERNAME ``` ## 3. go install ```sh -go install github.com/tiennm99/ghstats@latest +go install github.com/tiennm99/ghglance@latest ``` Requires Go 1.26+. Puts the binary in `$(go env GOPATH)/bin`. ## Docker image -Published to `ghcr.io/tiennm99/ghstats:` on each `v*` release via `.github/workflows/release.yml` (buildx, multi-tag: exact version, major.minor, major, latest). +Published to `ghcr.io/tiennm99/ghglance:` on each `v*` release via `.github/workflows/release.yml` (buildx, multi-tag: exact version, major.minor, major, latest). The Action itself uses a runner-built image by default (`image: Dockerfile` in `action.yml`). To switch to the pre-built image for faster cold starts, edit `action.yml`: ```yaml runs: using: docker - image: docker://ghcr.io/tiennm99/ghstats:v1 + image: docker://ghcr.io/tiennm99/ghglance:v1 ``` ## Release process @@ -117,12 +117,12 @@ runs: 3. On green, GHCR push + cross-platform binary artifacts happen automatically. 4. The `update-major-tag` job force-moves the floating major tag (e.g. `v1`) to this release's commit after test + docker + binaries all pass. - Consumers pinned to `tiennm99/ghstats@v1` pick up the release on their + Consumers pinned to `tiennm99/ghglance@v1` pick up the release on their next Action run without a workflow edit. 5. Docker base images and third-party actions are SHA-pinned (with version comments) so mutable-tag changes upstream can't rewrite a released image. 6. **Marketplace:** the action is listed on the GitHub Marketplace as - [`ghstats`](https://github.com/marketplace/actions/ghstats); the listing + [`ghglance`](https://github.com/marketplace/actions/ghglance); the listing name comes from `name:` in `action.yml`. Publishing is a web-UI step — edit the GitHub release and tick "Publish this Action to the GitHub Marketplace" — since `action-gh-release` cannot publish it. diff --git a/docs/design-guidelines.md b/docs/design-guidelines.md index 2be18254..81fc65e0 100644 --- a/docs/design-guidelines.md +++ b/docs/design-guidelines.md @@ -1,6 +1,6 @@ # Design Guidelines -Visual conventions for ghstats SVG cards. All cards share a single frame shape so they stack cleanly in a README — two cards sit side-by-side inside GitHub's ~816 px content column. +Visual conventions for ghglance SVG cards. All cards share a single frame shape so they stack cleanly in a README — two cards sit side-by-side inside GitHub's ~816 px content column. ## Card frame diff --git a/docs/project-overview-pdr.md b/docs/project-overview-pdr.md index 3ab99d87..38f285e4 100644 --- a/docs/project-overview-pdr.md +++ b/docs/project-overview-pdr.md @@ -1,4 +1,4 @@ -# ghstats — Product Development Requirements +# ghglance — Product Development Requirements ## One-liner @@ -13,7 +13,7 @@ Single-binary Go CLI + GitHub Action that renders 15 themed SVG cards summarisin - WakaTime-style editor telemetry. - Cloning repos or running linguist locally (lowlighter/metrics territory). A future `-accurate-languages` mode may add per-commit REST classification; clone-mode is out of scope for v1. -- Real-time / per-request API server. ghstats is a scheduled batch renderer. +- Real-time / per-request API server. ghglance is a scheduled batch renderer. ## Value proposition vs alternatives @@ -22,7 +22,7 @@ Single-binary Go CLI + GitHub Action that renders 15 themed SVG cards summarisin | anuraghazra/github-readme-stats | JS | hosted service | No (byte-size only) | | vn7n24fzkq/github-profile-summary-cards | TS | Action + hosted | No (primary-language-per-repo) | | lowlighter/metrics (indepth) | JS | Action | Yes (clones + linguist-js) | -| **ghstats** | Go | Action + CLI | Partial (byte-weighted today; REST-per-commit planned) | +| **ghglance** | Go | Action + CLI | Partial (byte-weighted today; REST-per-commit planned) | Distinguishing traits: - **Single binary**: no Node, no Ruby, no Docker needed for CLI usage. diff --git a/entrypoint.sh b/entrypoint.sh index 77f77b23..d2cd8d54 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh -# Entrypoint for the ghstats GitHub Action. +# Entrypoint for the ghglance GitHub Action. # Inputs are passed via INPUT_* environment variables (set by the Action runtime). -# This script translates them into ghstats CLI flags and optionally commits the +# This script translates them into ghglance CLI flags and optionally commits the # generated SVGs back to the repository. set -eu @@ -18,7 +18,7 @@ include_forks="${INPUT_INCLUDE_FORKS:-true}" include_private="${INPUT_INCLUDE_PRIVATE:-true}" include_org_repos="${INPUT_INCLUDE_ORG_REPOS:-false}" commit_changes="${INPUT_COMMIT_CHANGES:-false}" -commit_message="${INPUT_COMMIT_MESSAGE:-chore: update ghstats cards}" +commit_message="${INPUT_COMMIT_MESSAGE:-chore: update ghglance cards}" commit_branch="${INPUT_COMMIT_BRANCH:-}" author_name="${INPUT_AUTHOR_NAME:-github-actions[bot]}" author_email="${INPUT_AUTHOR_EMAIL:-41898282+github-actions[bot]@users.noreply.github.com}" @@ -30,8 +30,8 @@ fi mkdir -p "$out" -echo "Running ghstats for user=$user themes=$themes out=$out" -ghstats \ +echo "Running ghglance for user=$user themes=$themes out=$out" +ghglance \ -user "$user" \ -token "$token" \ -out "$out" \ diff --git a/go.mod b/go.mod index 18d7eed6..a3852e6a 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/tiennm99/ghstats +module github.com/tiennm99/ghglance go 1.26 diff --git a/internal/card/card.go b/internal/card/card.go index a2360fd2..ed16a616 100644 --- a/internal/card/card.go +++ b/internal/card/card.go @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) // Card renders one SVG for a Profile under the given theme. diff --git a/internal/card/card_test.go b/internal/card/card_test.go index 374ec3d6..25c984cf 100644 --- a/internal/card/card_test.go +++ b/internal/card/card_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) func TestRenderAll(t *testing.T) { @@ -35,7 +35,7 @@ func TestRenderAll(t *testing.T) { {Name: "Python", Color: "#3572A5", Value: 150}, }, TopRepos: []github.RepoInfo{ - {Owner: "tiennm99", Name: "ghstats", Stars: 42, PrimaryLanguage: "Go", PrimaryColor: "#00ADD8"}, + {Owner: "tiennm99", Name: "ghglance", Stars: 42, PrimaryLanguage: "Go", PrimaryColor: "#00ADD8"}, {Owner: "tiennm99", Name: "some-app & ", Stars: 17, PrimaryLanguage: "TypeScript", PrimaryColor: "#3178c6"}, {Owner: "tiennm99", Name: "fork-only", Stars: 99, IsFork: true}, }, diff --git a/internal/card/contributions.go b/internal/card/contributions.go index 2c4ca767..f158bf2f 100644 --- a/internal/card/contributions.go +++ b/internal/card/contributions.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type contributionsCard struct{} diff --git a/internal/card/contributions_by_year.go b/internal/card/contributions_by_year.go index 4ba4479a..918e473c 100644 --- a/internal/card/contributions_by_year.go +++ b/internal/card/contributions_by_year.go @@ -5,8 +5,8 @@ import ( "sort" "strings" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type contributionsByYearCard struct{} diff --git a/internal/card/contributions_heatmap.go b/internal/card/contributions_heatmap.go index f1f8c29b..6395bdc6 100644 --- a/internal/card/contributions_heatmap.go +++ b/internal/card/contributions_heatmap.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type contributionsHeatmapCard struct{} diff --git a/internal/card/contributions_trim_test.go b/internal/card/contributions_trim_test.go index e1ecddd5..4d35cd99 100644 --- a/internal/card/contributions_trim_test.go +++ b/internal/card/contributions_trim_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghglance/internal/github" ) // GitHub's contributionCalendar is week-aligned, so a "last year" series for a diff --git a/internal/card/donut_chart.go b/internal/card/donut_chart.go index 71535c25..0d538dde 100644 --- a/internal/card/donut_chart.go +++ b/internal/card/donut_chart.go @@ -5,8 +5,8 @@ import ( "math" "strings" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) // renderDonutCard draws a donut chart with a left-side legend. Shared by the diff --git a/internal/card/most_commit_language.go b/internal/card/most_commit_language.go index b036385e..c6445411 100644 --- a/internal/card/most_commit_language.go +++ b/internal/card/most_commit_language.go @@ -1,8 +1,8 @@ package card import ( - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type mostCommitLanguageCard struct{} diff --git a/internal/card/most_commit_language_all_time.go b/internal/card/most_commit_language_all_time.go index dec6962d..0adde5ae 100644 --- a/internal/card/most_commit_language_all_time.go +++ b/internal/card/most_commit_language_all_time.go @@ -1,8 +1,8 @@ package card import ( - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type mostCommitLanguageAllTimeCard struct{} diff --git a/internal/card/productive.go b/internal/card/productive.go index cc0a5bc0..acc2dc3f 100644 --- a/internal/card/productive.go +++ b/internal/card/productive.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type productiveCard struct{} diff --git a/internal/card/productive_weekday.go b/internal/card/productive_weekday.go index e5a85d31..b40e8fbb 100644 --- a/internal/card/productive_weekday.go +++ b/internal/card/productive_weekday.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type productiveWeekdayCard struct{} diff --git a/internal/card/profile.go b/internal/card/profile.go index 3ee2cc0e..28de29e6 100644 --- a/internal/card/profile.go +++ b/internal/card/profile.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type profileCard struct{} diff --git a/internal/card/records.go b/internal/card/records.go index af18ef84..8ebc2cfe 100644 --- a/internal/card/records.go +++ b/internal/card/records.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type recordsCard struct{} diff --git a/internal/card/records_test.go b/internal/card/records_test.go index 640dba8a..4c787bec 100644 --- a/internal/card/records_test.go +++ b/internal/card/records_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) // dayAt is a tiny helper so fixtures stay readable. diff --git a/internal/card/repos_per_language.go b/internal/card/repos_per_language.go index efb1213f..240ab0f6 100644 --- a/internal/card/repos_per_language.go +++ b/internal/card/repos_per_language.go @@ -1,8 +1,8 @@ package card import ( - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type reposPerLanguageCard struct{} diff --git a/internal/card/stats.go b/internal/card/stats.go index 40435eca..c43c81c0 100644 --- a/internal/card/stats.go +++ b/internal/card/stats.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type statsCard struct{} diff --git a/internal/card/streak.go b/internal/card/streak.go index adebce92..d5632b0d 100644 --- a/internal/card/streak.go +++ b/internal/card/streak.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type streakCard struct{} diff --git a/internal/card/top_starred_repos.go b/internal/card/top_starred_repos.go index cfee9626..2d51e615 100644 --- a/internal/card/top_starred_repos.go +++ b/internal/card/top_starred_repos.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) type topStarredReposCard struct{} diff --git a/internal/card/weekday_start_test.go b/internal/card/weekday_start_test.go index 2564c60d..989d1b67 100644 --- a/internal/card/weekday_start_test.go +++ b/internal/card/weekday_start_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) // TestPadToWeekGridRotatesByWeekStart checks that the leading blank pad diff --git a/internal/github/client.go b/internal/github/client.go index ae12edd6..39a131e7 100644 --- a/internal/github/client.go +++ b/internal/github/client.go @@ -69,7 +69,7 @@ func (c *Client) query(ctx context.Context, q string, vars map[string]any, out a return fmt.Errorf("new request: %w", err) } req.Header.Set("Content-Type", "application/json") - req.Header.Set("User-Agent", "ghstats") + req.Header.Set("User-Agent", "ghglance") if c.token != "" { req.Header.Set("Authorization", "bearer "+c.token) } diff --git a/internal/github/contribution_scope_test.go b/internal/github/contribution_scope_test.go index 892a31d1..c24564c5 100644 --- a/internal/github/contribution_scope_test.go +++ b/internal/github/contribution_scope_test.go @@ -59,7 +59,7 @@ func TestRepoAffiliationsAndOwnership(t *testing.T) { orgWrite := orgAdmin orgWrite.ViewerPermission = "WRITE" - own := repoNode{Name: "ghstats"} + own := repoNode{Name: "ghglance"} own.Owner = &struct { Login string `json:"login"` }{Login: "tiennm99"} diff --git a/main.go b/main.go index 47f69c03..b08c6b69 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// ghstats generates SVG cards summarizing a GitHub user's profile. +// ghglance generates SVG cards summarizing a GitHub user's profile. package main import ( @@ -11,9 +11,9 @@ import ( "syscall" "time" - "github.com/tiennm99/ghstats/internal/card" - "github.com/tiennm99/ghstats/internal/github" - "github.com/tiennm99/ghstats/internal/theme" + "github.com/tiennm99/ghglance/internal/card" + "github.com/tiennm99/ghglance/internal/github" + "github.com/tiennm99/ghglance/internal/theme" ) func main() { diff --git a/plans/reports/research-261003-1309-marketplace-action-name-vs-repo-name.md b/plans/reports/research-261003-1309-marketplace-action-name-vs-repo-name.md new file mode 100644 index 00000000..2e0bb618 --- /dev/null +++ b/plans/reports/research-261003-1309-marketplace-action-name-vs-repo-name.md @@ -0,0 +1,65 @@ +# Can a Marketplace action name match its repo name? + +Researched 2026-10-03 13:09 (Asia/Saigon). + +## Answer + +Yes. GitHub never checks the action's `name` against repository names, +including the action's own repo. The repo `tiennm99/ghstats` is not why +`ghstats` was rejected. The name collides with something else on GitHub. + +## Official rule + +From [Publishing actions in GitHub Marketplace](https://docs.github.com/en/actions/how-tos/create-and-publish-actions/publish-in-github-marketplace), +the `name` in `action.yml`: + +- must be unique; +- cannot match an action name already published on GitHub Marketplace; +- cannot match a GitHub user or organization, unless that user or + organization owner is the one publishing; +- cannot match a GitHub Marketplace category; +- cannot be a reserved GitHub feature name. + +None of these rules involve repositories. The owner exception covers only +user and organization names. For example, `tiennm99` could publish an action +called `tiennm99`, but nothing similar applies to repo names. + +## Why `ghstats` conflicts + +Public checks made on 2026-10-03 found no visible conflict: + +- `gh api users/ghstats` returned 404, so there's no visible user or org. +- `github.com/marketplace/actions/ghstats` returned 404, so there's no visible listing. + +GitHub still enforces the name, so it must be held by something the public +can't see. The likely holders are: + +1. **A suspended, flagged or otherwise hidden account named `ghstats`.** + The REST API returns 404 for these accounts, but the name stays reserved. +2. **A delisted or unpublished Marketplace action named `ghstats`.** It no + longer has a public page but still holds the name. +3. **A reserved name** on GitHub's internal list. + +This repo's own history supports this: `docs/deployment-guide.md` recorded +that "the bare `ghstats` listing was taken" before this session. + +Other projects have hit the same error and solved it the same way, by +renaming the action. Examples: +[baseliner-action#9](https://github.com/baselinerhq/baseliner-action/pull/9), +[simulation-action#12](https://github.com/roarkhq/simulation-action/pull/12), +[ChatGPT-CodeReview#5](https://github.com/arepresas/ChatGPT-CodeReview/pull/5). + +## Next steps + +1. Pick a different `name`. `ghstats-cards` is the safest choice because it + was used for this repo's listing before. +2. The listing name has no effect on how people call the action: + `uses: tiennm99/ghstats@v1` keeps working because it comes from the repo + path. +3. Rename in `action.yml`, update the README badge, the listing link and the + deployment guide, then tag a new release and publish it from the release page. + +## Unresolved questions + +- Which of the three possible holders owns `ghstats` can't be found out + from outside GitHub. GitHub Support could say whether it can be released.