fix: identify Copilot as automated contributor in contributor filtering - #63
fix: identify Copilot as automated contributor in contributor filtering#63beanbean9339 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 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
left a comment
There was a problem hiding this comment.
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>
Summary
Closes #60