Files
ghglance/action.yml
T
tiennm99 2943db667c feat: seed-based repo scanning + fork/private visibility flags
Replace the top-10-starred sampling with a seed list built from
contributionsCollection.commitContributionsByRepository, unioned across
every active contributionYear. Commit-history probes now land only on
repos where the user actually committed, covering all owned repos plus
forks and repos owned by others when allowed.

New visibility knobs (default off — public-facing READMEs stay
safe):
- -include-forks / include_forks    : include forked repos
- -include-private / include_private: include private repos (requires
                                      PAT with repo scope)

Compatibility:
- -top-repos default changed 10 → 0 (unlimited); still usable as a cap
  for fast local runs.
- commitHistoryQuery now takes $owner so probes can target forks or
  repos outside the user's ownership.
- FetchProfile now accepts FetchOptions; PublicRepos counts only repos
  that pass the visibility filter.

Seed-list approach mirrors github-profile-summary-cards' own repo
sourcing but keeps our byte-weighted commit attribution.
2026-04-18 22:01:26 +07:00

70 lines
2.1 KiB
YAML

name: ghstats
description: Generate GitHub profile summary SVG cards (profile, languages, stats, productive time)
author: tiennm99
branding:
icon: bar-chart-2
color: purple
inputs:
user:
description: GitHub username to summarize
required: true
token:
description: |
Personal access token (classic PAT) with at least `read:user` and `repo` scopes.
The default GITHUB_TOKEN works for public repos but has no access to private stats.
required: false
default: ${{ github.token }}
out:
description: Output directory for the generated SVG cards
required: false
default: output
themes:
description: Comma-separated theme ids, or `all` to render every theme
required: false
default: dracula
tz:
description: IANA timezone for the productive-time heatmap (e.g. Asia/Saigon)
required: false
default: UTC
top_repos:
description: Optional cap on seed repos probed for commit history (0 = unlimited)
required: false
default: "0"
commits_per_repo:
description: Max commits sampled per repo (covers last-year and all-time aggregates)
required: false
default: "500"
include_forks:
description: Include forked repos in stats and commit probing
required: false
default: "false"
include_private:
description: Include private repos (requires PAT with repo scope)
required: false
default: "false"
commit_changes:
description: Whether to commit the generated cards back to the repo
required: false
default: "false"
commit_message:
description: Commit message used when commit_changes is true
required: false
default: "chore: update ghstats cards"
commit_branch:
description: Branch to commit to (defaults to the current ref)
required: false
default: ""
author_name:
description: Git author name for auto-commit
required: false
default: "github-actions[bot]"
author_email:
description: Git author email for auto-commit
required: false
default: "41898282+github-actions[bot]@users.noreply.github.com"
runs:
using: docker
image: Dockerfile