remove 10 year filter - #48
Conversation
📝 WalkthroughWalkthroughChangesGitHub history and repository rankings
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Deploying with
|
| 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 |
There was a problem hiding this comment.
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 winCap the year range or update the docstring
createdAtis used directly to build theyearsarray, 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 winRestore a year-range cap or batch the requests
startYearnow comes directly fromcreatedAt, so the loop can fan out to onegetContributionsand onegetRepositoryContributionscall 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
📒 Files selected for processing (2)
yourstory/src/app/core/services/github.service.tsyourstory/src/server.ts
Summary by CodeRabbit