summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-08 00:02:51 +0300
committerPaul Buetow <paul@buetow.org>2025-07-08 00:02:51 +0300
commit352e129ac7e3cb5106de2c6f60d5994ffab1bedb (patch)
tree0e301fde1c966c22348c8230adc0c38d0c4597ca /internal
parentec77007c1b89ba054cc7460968c2d7d7b0e20f01 (diff)
feat: change average commit age calculation to last 42 commits
- Changed from 100 to 42 commits for average age calculation - 42 is the answer to life, the universe, and everything! - Updates both the calculation and display messages 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/showcase/metadata.go6
-rw-r--r--internal/showcase/showcase.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/showcase/metadata.go b/internal/showcase/metadata.go
index 209c7b6..a2cfa47 100644
--- a/internal/showcase/metadata.go
+++ b/internal/showcase/metadata.go
@@ -18,7 +18,7 @@ type RepoMetadata struct {
FirstCommitDate string
LastCommitDate string
License string
- AvgCommitAge float64 // Average age of last 100 commits in days
+ AvgCommitAge float64 // Average age of last 42 commits in days
}
// extractRepoMetadata extracts metadata from a repository
@@ -63,8 +63,8 @@ func extractRepoMetadata(repoPath string) (*RepoMetadata, error) {
license := detectLicense(repoPath)
metadata.License = license
- // Get average age of last 100 commits
- avgAge, err := getAverageCommitAge(repoPath, 100)
+ // Get average age of last 42 commits (42 is the answer!)
+ avgAge, err := getAverageCommitAge(repoPath, 42)
if err != nil {
fmt.Printf("Warning: Failed to get average commit age: %v\n", err)
}
diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go
index 9c5afa6..7213f0c 100644
--- a/internal/showcase/showcase.go
+++ b/internal/showcase/showcase.go
@@ -88,7 +88,7 @@ func (g *Generator) GenerateShowcase(repoFilter []string, forceRegenerate bool)
fmt.Printf("First Commit: %s\n", summary.Metadata.FirstCommitDate)
fmt.Printf("Last Commit: %s\n", summary.Metadata.LastCommitDate)
fmt.Printf("License: %s\n", summary.Metadata.License)
- fmt.Printf("Avg. age of last 100 commits: %.1f days\n", summary.Metadata.AvgCommitAge)
+ fmt.Printf("Avg. age of last 42 commits: %.1f days\n", summary.Metadata.AvgCommitAge)
}
fmt.Println("--- End of summary ---")