Skip to content

feat: add co-author support and bot filtering to contributors#17758

Open
myelinated-wackerow wants to merge 5 commits intodevfrom
feat/coauthor-contributors
Open

feat: add co-author support and bot filtering to contributors#17758
myelinated-wackerow wants to merge 5 commits intodevfrom
feat/coauthor-contributors

Conversation

@myelinated-wackerow
Copy link
Collaborator

@myelinated-wackerow myelinated-wackerow commented Mar 11, 2026

Summary

Contributor lists previously only showed primary commit authors, missing anyone credited via Co-authored-by: trailers. This expands attribution to include co-authors and filters out bots/AI agents.

What changed

  • Co-author parsing -- Extract Co-authored-by: trailers from commit messages and include co-authors in page contributor lists
  • Bot/AI filtering -- Exclusion lists for AI agents (Claude, Copilot, Gemini, etc.) and bots (dependabot, netlify, etc.) to keep contributor lists human-only
  • Ported to data-layer -- Co-author logic lives in fetchGitHubContributors.ts (the data-layer fetcher from Move GitHub contributors fetching to scheduled data-layer task #17174), not the old gh.ts
  • Co-author resolution chain -- For each co-author trailer:
    1. Try extracting login from GitHub noreply email
    2. Match display name against .all-contributorsrc (1,500+ known contributors)
    3. Fall back to trailer name with initials avatar (no profile link)
  • Avatar URL fix -- Use avatars.githubusercontent.com/{login} instead of the API's /u/{id}?v=4 format, which causes redirect loops with Next.js image optimization
  • No-profile contributor support -- FileContributors component handles contributors without GitHub accounts (initials fallback, name without @ prefix, no broken link)

Excluded patterns

Logins: dependabot[bot], github-actions[bot], allcontributors[bot], netlify[bot], crowdin-bot, eth-bot, ethereumoptimism-bot, coderabbitai[bot]

Name patterns (case-insensitive): claude, copilot, gpt, chatgpt, openai, cursor, codeium, tabnine, amazon q, cody, gemini, coderabbit

Emails: noreply@anthropic.com, copilot@github.com, bot noreply addresses

Files changed

  • src/data-layer/fetchers/fetchGitHubContributors.ts -- co-author parsing, bot filtering, name lookup, avatar URL fix
  • src/components/FileContributors.tsx -- no-profile contributor rendering (initials fallback, conditional link/label)

Test plan

  • Contributor avatars load correctly (username-based URLs)
  • No-profile contributors show initials fallback (e.g., "JA" for John Anon)
  • No-profile contributors show name without @ prefix in modal
  • Run trigger.dev task and compare output against raw GitHub API to confirm bots are excluded (filtering happens at fetch time, not render time -- mock data bypasses the fetcher)
  • Confirm co-authors with GitHub noreply emails appear in contributor lists
  • Confirm co-authors resolved via .all-contributorsrc name match get proper avatars

Generated with Claude Code

Parse Co-authored-by trailers from commit messages
to include co-authors in page contributor lists.
Add exclusion lists for AI agents and bots
(Claude, Copilot, CodeRabbit, Gemini, etc.) to
keep contributor lists human-only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 23ecab1
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69b34fc2989fb00008345276
😎 Deploy Preview https://deploy-preview-17758.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 61 (🟢 up 8 from production)
Accessibility: 94 (🟢 up 1 from production)
Best Practices: 100 (no change from production)
SEO: 99 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the tooling 🔧 Changes related to tooling of the project label Mar 11, 2026
myelinated-wackerow and others added 3 commits March 12, 2026 19:55
Resolve conflict in src/lib/utils/gh.ts by accepting
dev version -- fetching logic moved to data-layer
in PR #17174, so the old code from this branch is
no longer needed here.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Move co-author parsing, bot/AI filtering, and
exclusion lists from the removed gh.ts fetching
code into fetchGitHubContributors.ts where the
contributor fetching now lives post-#17174.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Add fallback chain for co-author resolution:
1. Extract login from GitHub noreply email
2. Match name against .all-contributorsrc
3. Fall back to trailer name (no avatar/link)

Update FileContributors component to handle
contributors without GitHub profiles by showing
initials and name without link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@wackerow wackerow marked this pull request as draft March 12, 2026 22:18
Use avatars.githubusercontent.com/{login} instead of
the API's /u/{id}?v=4 format which causes redirect
loops with Next.js image optimization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@wackerow wackerow marked this pull request as ready for review March 13, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant