Thanks for your interest! Bug reports, ideas and pull requests are welcome.
Use the issue forms. For bugs, include the card, how you use the action, the version and the log output of the "Generate" step. Never paste tokens or secrets.
No dependencies, just Python 3.9+ (standard library only).
git clone https://github.com/spidero/github-stats-card && cd github-stats-card
python3 -m unittest discover -s tests -t . # offline unit + render tests
python3 preview.py # renders every card x theme to preview/index.htmlFetch real data (optional, needs a token):
GITHUB_TOKEN=$(gh auth token) python3 -m github_cards <login> dist --cards allSee "Adding a new card": one module in
github_cards/cards/ with fetch(api, login, options) and render(data, theme, options).
Please keep in mind:
- Visible without animations: animate from a hidden state (
animation: ... backwards), never leave content atopacity: 0; a test checks this. - Works with the default
GITHUB_TOKEN: some GraphQL fields need more permissions; fetch optional fields withapi.try_query()and leave them out when unavailable. - No repository names from private repos on cards, only aggregated numbers.
- Escape text with
escape()fromsvg.py; colors only via themes /parse_colors. - Add sample data for the card to
samples/spidero.json(--dump-data) and a render test.
Add an entry to THEMES in github_cards/themes.py (all keys: bg, border, title,
label, value, accent, track; optional bg2 for a gradient). Check it with
python3 preview.py on both light and dark pages, and keep text readable (contrast).
- One topic per PR, with tests passing (
python3 -m unittest discover -s tests -t .). - Don't change defaults or output file names in a way that breaks existing
@v1users; breaking changes go to a new major version. - Describe what changed and add a screenshot for visual changes.
By contributing you agree that your contributions are licensed under the MIT License and to follow the Code of Conduct.