Skip to content

fix: identify Copilot as automated contributor in contributor filtering - #63

Open
beanbean9339 wants to merge 1 commit into
mainfrom
fix/contributor-filtering
Open

fix: identify Copilot as automated contributor in contributor filtering#63
beanbean9339 wants to merge 1 commit into
mainfrom
fix/contributor-filtering

Conversation

@beanbean9339

Copy link
Copy Markdown
Collaborator

Summary

  • Update contributor filtering to exclude Copilot-related accounts based on username or profile name
  • Keep the existing Claude bot filtering behavior
  • Add tests for Copilot usernames, mixed-case Copilot names, Claude bots, and normal human contributors

Closes #60

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The filtering logic change matches the linked acceptance criteria and is covered by targeted tests that validate both exclusions and non-exclusions.

Pull request overview

This PR improves the GitHub contributor import pipeline by more reliably filtering out automated Copilot-related contributors so they don’t appear in exported metadata (e.g., CITATION.cff / .zenodo.json), while preserving existing Claude-bot filtering behavior.

Changes:

  • Extend automated-contributor detection to exclude accounts whose username or profile name contains "copilot" (case-insensitive).
  • Add test coverage for Copilot usernames (including mixed case), Copilot-in-profile-name cases, existing Claude bots, and normal human contributors.
File summaries
File Description
src/services/githubImporterContributors.js Adds a case-insensitive "copilot" substring check on login/profile name to classify contributors as automated and exclude them.
tests/services/githubImporter.test.js Expands the GitHub import test fixture to cover Copilot-related contributor variants (login + profile-name) and verify a normal contributor is retained.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@NetZissou NetZissou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right fix. But I think it'd be better to introduce this change in isAutomatedContributorIdentity, right after the string normalization.

Otherwise we'll also have to add this pattern check in extractCoAuthorNamesFromCommitMessage which will introduce code duplication.


Adding a test case that validate co-authorship in commit msgs, something like:

Co-authored-by: Copilot Coding Agent <copilot@github.com>

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.

Improve bot contributor filtering

3 participants