Skip to content

fix(scripts): never count bots or AI agents as contributors - #329

Merged
danbaruka merged 1 commit into
IntersectMBO:mainfrom
IanoNjuguna:chore/exclude-agent-contributors
Oct 14, 2026
Merged

danbaruka merged 1 commit into
IntersectMBO:mainfrom
IanoNjuguna:chore/exclude-agent-contributors

Conversation

@IanoNjuguna

Copy link
Copy Markdown
Contributor

Description

The build-time fetch that populates the homepage community section filtered contributors on the account type plus a hard-coded Dependabot name check:

.filter(user => user.type !== 'Bot' && !user.login.toLowerCase().includes('dependabot'))

GitHub only labels some automation accounts as type Bot. cursoragent is reported as type User with 1 contribution, and it sits at position 15 in the API's contribution order — exactly the boundary of the script's .slice(0, 15) — so it flickers in and out of the rendered contributor list depending on tie ordering. It was present in the snapshot committed on 2026-08-01 and absent from a fetch run today. Since Contributors.tsx renders whatever the snapshot contains, the site can present an AI coding agent as a person who contributed. A claude, copilot-swe-agent, codex-agent or devin-* account would land the same way.

This filters the login against automation patterns in addition to the type check, so no automation account can render as a contributor. Widening the slice would not have fixed it — that only moves the boundary.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

  • I have tested these changes locally
  • I have checked for broken links — n/a, no content changes
  • Code examples have been tested — n/a

Ran the script end to end against the live API:

$ node scripts/fetch-github-data.js
$ → 15 contributors: danbaruka, Ranchhand87, IanoNjuguna, Emmanuel-Tyty, HarunJr,
    thisisobate, SuganyaAK, ThatGuyLLC, aleeusgr, mbagalwa, Mechack08, besiwims,
    CHRISLeGURU, chiztechnology, sadSanta-07
  cursoragent present? False

Filter behaviour against agent-style logins that could appear later:

DROPPED cursoragent, claude, claude-code, claude[bot], copilot-swe-agent,
        codex-agent, devin-ai-integration, dependabot[bot]
kept    danbaruka, Ranchhand87, IanoNjuguna, CHRISLeGURU, sadSanta-07,
        Mechack08, ChizTechnology

Notes for review

  • Scope is deliberately one file: scripts/fetch-github-data.js. It does not touch the committed snapshot, so nothing in website/src/data/githubData.json changes here — that file is regenerated by the prebuild hook on every build.
  • The pattern list is intentionally conservative and matches on substrings (agent, cursor, claude, …). A human login containing one of those words would be filtered too; none exist in this repo's contributor list today.

Fixes #326

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my changes
  • I have made corresponding changes to the documentation — n/a
  • My changes generate no new warnings

The build-time fetch filtered on type !== 'Bot' plus a dependabot name check,
which misses automation accounts GitHub reports as type 'User' — cursoragent
is one, and it sits exactly on the .slice(0, 15) boundary, so it flickers in
and out of the rendered contributor list depending on tie ordering. A Claude
or Copilot agent account would land the same way.

Filter the login against the automation patterns (bot, dependabot, agent,
copilot, claude, cursor, codex, devin) in addition to the type check, so no
automation account can render as a person. Verified by running the script:
15 human contributors, cursoragent excluded.

Refs IntersectMBO#326
@IanoNjuguna IanoNjuguna added the bug Something isn't working label Oct 14, 2026
@danbaruka
danbaruka merged commit d3877a9 into IntersectMBO:main Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contributor list can include bot and AI-agent accounts (cursoragent is one today)

2 participants