diff options
Diffstat (limited to 'internal/showcase/showcase.go')
| -rw-r--r-- | internal/showcase/showcase.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go index fbae2b7..4e8d637 100644 --- a/internal/showcase/showcase.go +++ b/internal/showcase/showcase.go @@ -1046,16 +1046,13 @@ func (g *Generator) formatGemtext(summaries []ProjectSummary) string { builder.WriteString("* 🧪 Status: Experimental (no releases yet)\n") } - // Check if project might be obsolete (avg age > 2 years AND last commit > 1 year) - if summary.Metadata.AvgCommitAge > 730 && summary.Metadata.LastCommitDate != "" { - // Parse the last commit date - lastCommit, err := time.Parse("2006-01-02", summary.Metadata.LastCommitDate) - if err == nil { - daysSinceLastCommit := time.Since(lastCommit).Hours() / 24 - if daysSinceLastCommit > 365 { - builder.WriteString("\n⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk.") - } - } + // Mark as inactive when the average age of the last 42 commits exceeds + // 730 days (~2 years). A single recent commit (e.g. a deprecation + // notice) does not rescue a dormant project — ~42 recent commits are + // required to move the average below the threshold. This matches the + // grey-line rule used in the interactive rank-history SVG. + if summary.Metadata.AvgCommitAge > 730 { + builder.WriteString("\n⚠️ **Notice**: This project appears to be inactive or no longer maintained. The average age of its last 42 commits exceeds 2 years. Use at your own risk.") } builder.WriteString("\n\n") } |
