Skip to content

Include anonymous human GitHub contributors and preserve hyphenated names - #70

Open
beanbean9339 wants to merge 1 commit into
mainfrom
fix/issue-69-anonymous-names
Open

beanbean9339 wants to merge 1 commit into
mainfrom
fix/issue-69-anonymous-names

Conversation

@beanbean9339

Copy link
Copy Markdown
Collaborator

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.

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.

Copilot review overview

🟡 Changes recommended

Two moderate issues and one test-coverage nit remain unresolved.

Review effort: Lite
Findings: 1 Medium severity · 1 Low severity

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 };
Comment thread src/services/githubApi.js

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

No deployments
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.

Support anonymous GitHub contributors and human hyphenated author names

2 participants