From 81b6357a96e684d7588e499c8a7f3ab892c8c02a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 8 Jul 2025 22:52:51 +0300 Subject: feat: add obsolete project notice for inactive projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add warning notice for projects with avg commit age > 2 years AND last commit > 1 year - Display "⚠️ Notice: This project appears to be finished, obsolete, or no longer maintained" - Also update abandoned branch threshold from 1 to 3 years in branch analyzer - Helps users identify potentially outdated or unmaintained projects 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/showcase/showcase.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'internal/showcase') diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go index 60b0fb2..aa3e959 100644 --- a/internal/showcase/showcase.go +++ b/internal/showcase/showcase.go @@ -401,7 +401,20 @@ func (g *Generator) formatGemtext(summaries []ProjectSummary) string { } builder.WriteString(fmt.Sprintf("* Development Period: %s to %s\n", summary.Metadata.FirstCommitDate, summary.Metadata.LastCommitDate)) builder.WriteString(fmt.Sprintf("* Recent Activity: %.1f days (avg. age of last 42 commits)\n", summary.Metadata.AvgCommitAge)) - builder.WriteString(fmt.Sprintf("* License: %s\n\n", summary.Metadata.License)) + builder.WriteString(fmt.Sprintf("* License: %s\n", summary.Metadata.License)) + + // 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.") + } + } + } + builder.WriteString("\n\n") } // Handle images and paragraphs -- cgit v1.2.3