From 352e129ac7e3cb5106de2c6f60d5994ffab1bedb Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 8 Jul 2025 00:02:51 +0300 Subject: feat: change average commit age calculation to last 42 commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- internal/showcase/metadata.go | 6 +++--- internal/showcase/showcase.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'internal') 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 ---") -- cgit v1.2.3