Skip to content

Port bazel-diff contributor logic into README generator - #41

Merged
tinder-maxwellelliott merged 1 commit into
mainfrom
claude/contributor-logic-bazel-diff-b9d101
Oct 24, 2026
Merged

tinder-maxwellelliott merged 1 commit into
mainfrom
claude/contributor-logic-bazel-diff-b9d101

Conversation

@tinder-maxwellelliott

Copy link
Copy Markdown
Collaborator

Summary

Borrows the contributors section logic from Tinder/bazel-diff so we can showcase everyone who has contributed to sign-here.

  • Source of truth is git log, not the GitHub contributors API, so every committer appears. Commits are rolled up by author name (keeping the email with the most commits) and sorted by commit count.
  • Emails resolve to GitHub logins via the commits API for avatars and profile links, with a <id>+<login>@users.noreply.github.com fallback. GITHUB_TOKEN is used when set to avoid rate limits.
  • Bots are filtered out (type == "Bot" or a [bot] suffix).
  • Renders a 6-column table with 64px avatar and display name, matching bazel-diff's README, instead of the old bare 40px avatar row.

Small departures from bazel-diff: author names are HTML-escaped, and --offline now still produces a names-only table from git history (with a warning per unresolved author) instead of a placeholder.

Changes

  • tools/readme/generate_readme.py: contributor logic ported; old _fetch_contributors removed
  • tools/readme/generate_readme_test.py: 14 unit tests (bot detection, noreply parsing, roll-up, escaping, column wrapping, fallbacks)
  • Makefile: generate_readme and readme_tool_test targets
  • .github/workflows/ci.yaml: run the new self-tests alongside the coverage tool self-tests
  • README.md: regenerated Contributors section; all 7 contributors resolve with avatars

Testing

  • make readme_tool_test passes locally (14 tests).
  • The Contributors section was generated against the real history with the GitHub API and spliced into README.md. The full bazel run //:generate_readme was not run locally (no Xcode on this machine), so the rest of the README is unchanged from the current generated output.

🤖 Generated with Claude Code

Build the Contributors section the way Tinder/bazel-diff does: authors come
from `git log` (rolled up by name, sorted by commit count), emails resolve to
GitHub logins via the commits API for avatars and profile links, with a
noreply-address fallback, and bots are filtered out. Render a 6-column table
with avatar and display name instead of the bare avatar row.

- Add unit tests for the contributor logic and run them in CI
- Add `make generate_readme` and `make readme_tool_test`
- Regenerate README.md with the new table

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@tinder-maxwellelliott
tinder-maxwellelliott merged commit fbc34ac into main Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants