feat: render API-omitted contributors and auto-refresh community.json#179
Merged
Conversation
The GitHub contributors API only returns commits whose author email is linked to a GitHub account, so contributors whose merges haven't yet been indexed (or whose email isn't bound) never render in the SVG. Add a repeatable --add login[:count] flag that force-includes a login, resolving its avatar via the users API (falling back to github.com/<login>.png) and overriding the API count when the login is already present. Regenerate both themed SVGs to include YunyaoYan (PR #178), now 17 contributors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two related fixes so both the README and the website show the full contributor list (now 17, including
YunyaoYan), plus a new CI job to keep the website's community data fresh.docs/build_contributors_svg.py— add--add login[:count]to force-include a contributor the GitHub/contributorsAPI omits; regenerate both themed README SVGs.docs/build_community_json.py— add the same--addflag; regeneratedocs/page/assets/community.json(the data source for the website's contributors + stargazers blocks) → 17 contributors, refreshed stargazers..github/workflows/update-community-json.yml— new daily-scheduled workflow that regeneratescommunity.jsonautomatically.Why
Both the README SVG and the website source their contributor list exclusively from the GitHub
/contributorsREST API. That API only returns commits whose author email is linked to a GitHub account, and a freshly-merged first contribution can take time to be indexed — soYunyaoYan(PR #178) was missing from both surfaces.Separately,
community.json(contributors and stargazers) had no CI refreshing it — only the README SVG had an automated workflow. Stargazer counts on the site would drift stale.How
--add login[:count](both scripts): if the login is already returned by the API its count is overridden; otherwise it's appended with an avatar resolved via the users API (fallbackgithub.com/<login>.png). List re-sorted by(-count, login).reademe-contributors.yml: reuses built-inGITHUB_TOKEN, guards against self-triggered infinite loops (github.actor != 'github-actions[bot]'),concurrencygroup, dailycron, commits only when the file changes. Pins--add YunyaoYan:1.Verification
ruff check+ruff format --check: pass on both scriptsupdate-community-json.yml: valid YAMLgithub.com/YunyaoYan(17 unique contributor links)community.json: 17 contributors (incl.YunyaoYan), stargazers refreshed (970 → 988), structure unchanged