Skip to content

Discover human author names from bounded commit history - #71

Open
beanbean9339 wants to merge 4 commits into
mainfrom
feat/issue-68-commit-authors
Open

beanbean9339 wants to merge 4 commits into
mainfrom
feat/issue-68-commit-authors

Conversation

@beanbean9339

Copy link
Copy Markdown
Collaborator

Closes #68

Independently from PR #64, scan up to 100 recent commits without a token or 1,000 with a token for usable human author names. Exclude known GitHub logins, handles and bot identities; add history authors after contributor/co-author results and preserve deduplication. Includes focused pagination tests and updates importer fixtures to expect 100 commits on the initial request.

Validation: npm run test (106 passed), 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.

🟡 Changes recommended

Commit-history author handling can admit excluded bot identities and aliases, omit legitimate hyphenated names, and change existing metadata author ordering.

4 open issues
What changed in this PR

This PR extends OpenCite’s GitHub importer to discover authors from recent commit history when repository metadata or contributor profiles are incomplete, addressing #68 separately from contributor fallback limits.

Changes:

  • Adds bounded history scans of up to 100 commits without a token or 1,000 with a token.
  • Filters discovered identities and merges history authors after co-author and contributor results with deduplication.
  • Adds focused pagination/filtering tests, updates importer fixtures, and documents scan limits.
File Description
tests/​services/​githubImporter.test.js Updates fixtures for initial 100-commit requests.
tests/​services/​commitAuthors.test.js Tests pagination, filtering, and unauthenticated scan limits.
src/​services/​githubImporterContributors.js Exposes contributor logins for identity filtering.
src/​services/​githubImporterCommitAuthors.js Implements bounded commit-author discovery.
src/​services/​githubImporter.js Integrates history authors into imported author lists.
src/​services/​githubApi.js Adds commit-list pagination support.
README.md Documents history discovery and scan limits.

Review effort: Balanced

Comment thread src/services/githubImporter.js Resolved

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.

🟡 Changes recommended

Commit-author filtering can import GitHub handles as citation names, and the merge test does not verify that history-only authors are actually added.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Filter commit author names against logins from all scanned commits

src/​services/​githubImporterCommitAuthors.js:34

This set contains only contributor API logins, not logins exposed by the scanned commits. If the contributor API omits an account, an anonymous commit named Jane-Doe is accepted even when another scanned commit identifies Jane-Doe as its GitHub login, importing a handle as a citation name. Collect logins from all scanned commit author records and filter candidate names against the completed set, including logins discovered on later pages.

4 resolved since last review

Review effort: Balanced


if (value.endsWith('/repos/test-owner/test-repo/commits?per_page=100&sha=main')) {
return jsonResponse([
{ commit: { author: { name: 'John Smith' } }, author: null },
@beanbean9339 beanbean9339 added the enhancement New feature or request label Nov 8, 2026
@beanbean9339
beanbean9339 force-pushed the feat/issue-68-commit-authors branch from 00dc97a to 5de14fc Compare November 8, 2026 22:38

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

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discover human authors from commit history when contributor profiles are incomplete

2 participants