Include anonymous human GitHub contributors and preserve hyphenated names - #70
Open
beanbean9339 wants to merge 1 commit into
Open
beanbean9339 wants to merge 1 commit into
beanbean9339 wants to merge 1 commit into
Conversation
This was referenced Sep 27, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two moderate issues and one test-coverage nit remain unresolved.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds anonymous human GitHub contributors while filtering automated identities and preserving qualifying hyphenated names.
Changes:
- Requests anonymous contributor records with
anon=1. - Filters bots and handle-like names.
- Applies GitHub-specific name handling to contributors and co-authors.
- Adds regression coverage.
| File | Summary |
|---|---|
tests/services/anonymousContributors.test.js |
Tests anonymous contributor filtering and name normalization. |
src/services/githubImporterContributors.js |
Handles anonymous contributors and hyphenated names; multi-token hyphenated names still require changes. |
src/services/githubImporter.js |
Applies name handling to co-authors; handle-like names still require filtering. |
src/services/githubApi.js |
Requests anonymous contributors; test should explicitly assert anon=1. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+14
to
+16
| const trimmed = String(name ?? '').trim(); | ||
| const hyphenatedName = trimmed.includes('-') && trimmed.split('-').every((segment) => /^[A-Z][a-z]+$/.test(segment)); | ||
| return hyphenatedName ? { familyNames: trimmed, ...extra } : { name: trimmed, ...extra }; |
|
|
||
| export function buildGithubContributorsApiUrl(owner, repo, page, perPage = 100) { | ||
| return `${API_BASE}/repos/${owner}/${repo}/contributors?per_page=${perPage}&page=${page}`; | ||
| return `${API_BASE}/repos/${owner}/${repo}/contributors?anon=1&per_page=${perPage}&page=${page}`; |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #69
Ask GitHub for anonymous contributor records, keep anonymous humans while filtering bots/handles, and preserve Title-Case hyphenated names only for GitHub-derived authors. Independent of PR #64's fallback count fix.
Validation:
npm run test,npm run build.