Repository navigation
feat(fetcher): add git_age for repository age from first commit - #165
Conversation
Walks all commits reachable from HEAD and reports the calendar age from the oldest. Supports 10 shapes: Text (with `format = "duration" | "since" | "full"`), TextBlock, MarkdownTextBlock, LinkedTextBlock, Entries, NumberSeries, Bars, Calendar (highlights first-commit day), Badge (`fresh` / `young` / `mature` / `ancient` tier), and Timeline (single "First commit" event). Targets #164 (`project_codebase` preset subtitle) and ticks the open box in #63. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA new Git fetcher ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #165 +/- ##
==========================================
+ Coverage 77.76% 78.06% +0.29%
==========================================
Files 122 123 +1
Lines 23045 23578 +533
==========================================
+ Hits 17922 18407 +485
- Misses 5123 5171 +48
🚀 New features to boost your workflow:
|
Summary
git_agefetcher: walks every commit reachable fromHEADand reports the calendar age from the oldest. All local,Safety::Safe.git_agein #63; intended subtitle for theproject_codebasepreset in #164.Behaviour
textTextformatting is switchable viaformat = "...":format"duration"2y 3m"since"since 2024-01-15"full"2y 3m · since 2024-01-15Other shapes:
Years: N/Months: N/Days: N/Since: YYYY-MM-DD**2y 3m 12d** since \2024-01-15``list_links)years/months/days/first_commit_date[years, months, days]years/months/daysfresh< 30d,young< 1y,mature< 5y,ancient≥ 5y) + durationFirst commiteventEmpty repo (no commits): structural shapes emit empty bodies,
Badgeshows"no commits"(Status::Warn).Compatible renderers
texttext_plain,text_ascii,animated_typewriter,animated_postfx,animated_figlet_morph,animated_boot,animated_scanlines,animated_splitflap,animated_wavetext_blocktext_plain,list_plain,animated_*markdown_text_blocktext_markdownlinked_text_blocklist_linksentriesgrid_table,animated_*number_serieschart_sparkline,chart_histogram,animated_*barschart_bar,chart_pie,list_ranking,animated_*calendargrid_calendar,animated_*badgestatus_badge,animated_*timelinelist_timeline,animated_*Full reference (auto-generated after merge): https://splashboard.unhappychoice.com/reference/fetchers/git/git_age/
Test plan
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test— 883 passed (16 new tests ongit_age, includingAge::betweencalendar arithmetic, format variants, per-shape body construction, badge tier thresholds, empty-repo behaviour)cargo run --bin splashboard -- catalog fetcher git_age— lists 10 shapes and the compatible renderers above.splashboard/dashboard.tomlexercising every shape (deleted before commit)🤖 Generated with Claude Code
Summary by CodeRabbit