Skip to content

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

Open
beanbean9339 wants to merge 3 commits into
mainfrom
fix/issue-69-anonymous-names
Open

beanbean9339 wants to merge 3 commits 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 thread src/services/githubImporterContributors.js Outdated
Comment thread src/services/githubApi.js

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

Contributor filtering currently rejects valid apostrophe-containing and non-ASCII names and accepts underscore-style handles.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread src/services/githubImporterContributors.js Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

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

🔵 Needs a closer look

Two moderate issues remain in contributor name filtering and Unicode hyphenated-name handling.

Review effort: Lite
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Reject lowercase hyphenated handles as contributor author names

src/​services/​githubImporterContributors.js:348

This profile path still turns a username-like display name such as jane-doe into the author Jane Doe: buildContributorAuthorInput falls back to { name } for lowercase hyphenated tokens, and normalizeAuthor humanizes that value. Check isUsableContributorName(profile.name) before constructing this author (and avoid treating any associated ORCID as auto-filled when the name is rejected), so GitHub-derived handles remain excluded while Title-Case human names are preserved.

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