Skip to content

remove 10 year filter - #48

Merged
santoshyadavdev merged 1 commit into
mainfrom
santoshyadavdev-remove-commit-data-filtering
Jul 14, 2026
Merged

remove 10 year filter#48
santoshyadavdev merged 1 commit into
mainfrom
santoshyadavdev-remove-commit-data-filtering

Conversation

@santoshyadavdev

@santoshyadavdev santoshyadavdev commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Improvements
    • GitHub activity and repository insights now include data from the repository’s full available history, without the previous lookback restriction.
    • Repository contribution results are now sorted by total contributions and include the complete list instead of being limited to 10 entries.
    • Repository insights continue to present the top 10 repositories where applicable.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

GitHub history and repository rankings

Layer / File(s) Summary
Use direct creation years
yourstory/src/app/core/services/github.service.ts
Aggregated activity and repository insights now use the provided creation year without MAX_YEARS clamping.
Return complete repository rankings
yourstory/src/app/core/services/github.service.ts, yourstory/src/server.ts
Repository results are sorted by contributions without filtering or truncating the returned list.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: enhancement

Poem

A rabbit sorts repos in a neat little row,
No stars or top-ten stop the flow.
Creation years stretch through the forest wide,
Every contribution gets a place beside.
Hop, hop—full history arrives with pride!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change: removing the 10-year lookback filtering in GitHub activity calculations.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
commitstory ec5c788 Commit Preview URL

Branch Preview URL
Jul 14 2026, 01:04 PM

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jul 14, 2026

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
yourstory/src/app/core/services/github.service.ts (2)

181-197: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Cap the year range or update the docstring createdAt is used directly to build the years array, so older accounts can trigger far more than the stated 10-year window and fan out many extra requests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@yourstory/src/app/core/services/github.service.ts` around lines 181 - 197,
Update getRepositoryInsights so the calculated startYear is capped to the
documented maximum 10-year window relative to currentYear before constructing
the years array. Preserve the existing createdAt-based behavior for accounts
within that range and the fallback behavior when createdAt is absent.

119-137: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Restore a year-range cap or batch the requests

startYear now comes directly from createdAt, so the loop can fan out to one getContributions and one getRepositoryContributions call per account year. For long-lived accounts, that can mean dozens of concurrent GitHub requests on a single load, which is a real rate-limit and latency risk. The docstring is also stale and should drop the “capped at a maximum of 10 years” claim.

📝 Update stale docstring
   /**
-   * Fetches contributions from the user's account creation year to the current year,
-   * capped at a maximum of 10 years, then aggregates the numeric fields by summing them.
+   * Fetches contributions from the user's account creation year to the current year,
+   * then aggregates the numeric fields by summing them.
    * Discussion counts are included once — they are already lifetime totals.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@yourstory/src/app/core/services/github.service.ts` around lines 119 - 137,
Cap the account-history range in getAggregatedActivity to a maximum of 10 years
before the contribution-request loop runs, while preserving the fallback range
for missing createdAt values. Update the method docstring to describe the actual
capped behavior without claiming an unsupported range.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@yourstory/src/app/core/services/github.service.ts`:
- Around line 181-197: Update getRepositoryInsights so the calculated startYear
is capped to the documented maximum 10-year window relative to currentYear
before constructing the years array. Preserve the existing createdAt-based
behavior for accounts within that range and the fallback behavior when createdAt
is absent.
- Around line 119-137: Cap the account-history range in getAggregatedActivity to
a maximum of 10 years before the contribution-request loop runs, while
preserving the fallback range for missing createdAt values. Update the method
docstring to describe the actual capped behavior without claiming an unsupported
range.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5bc285fc-1f46-4bf0-9f96-a4a85d4e22c4

📥 Commits

Reviewing files that changed from the base of the PR and between 24ce8a9 and ec5c788.

📒 Files selected for processing (2)
  • yourstory/src/app/core/services/github.service.ts
  • yourstory/src/server.ts

@santoshyadavdev
santoshyadavdev merged commit 338b400 into main Jul 14, 2026
3 checks passed
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.

1 participant