Skip to content

Fix/active years from contributions - #125

Open
aspire488 wants to merge 4 commits into
Younesfdj:masterfrom
aspire488:fix/active-years-from-contributions
Open

aspire488 wants to merge 4 commits into
Younesfdj:masterfrom
aspire488:fix/active-years-from-contributions

Conversation

@aspire488

Copy link
Copy Markdown

Summary

Fixes #90.

GitFut currently derives active_years from createdAt / pushedAt dates on repositories the user owns. This can undercount developers whose contribution history includes organization-owned, private, or contribution-only repositories.

Changes

  • Derive active_years from GitHub's existing annual contributionsCollection results.
  • Stop using owned-repository timestamps as a proxy for activity history.
  • Preserve missing/failed annual windows as unavailable rather than inventing activity.
  • Add regression tests covering:
    • activity in years not represented by owned repositories
    • missing annual contribution windows
    • an empty contribution history

No additional GitHub API requests are required because the annual contribution data is already fetched by the client.

Testing

Added focused coverage in tests/signals.test.ts.

The production change is limited to lib/github/signals.ts.

Closes #90.

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.

Active years are undercounted for organization contributions

1 participant