summaryrefslogtreecommitdiff
path: root/internal/sync
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-08 22:52:51 +0300
committerPaul Buetow <paul@buetow.org>2025-07-08 22:52:51 +0300
commit81b6357a96e684d7588e499c8a7f3ab892c8c02a (patch)
tree7890b445befcf4b12af9d328a9aa2dd7a070431e /internal/sync
parent5004ae7bf93e59e0e4992fa6c9640c427393f4a1 (diff)
feat: add obsolete project notice for inactive projects
- 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 <noreply@anthropic.com>
Diffstat (limited to 'internal/sync')
-rw-r--r--internal/sync/branch_analyzer.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/sync/branch_analyzer.go b/internal/sync/branch_analyzer.go
index c3b2204..f684f60 100644
--- a/internal/sync/branch_analyzer.go
+++ b/internal/sync/branch_analyzer.go
@@ -46,12 +46,13 @@ func (s *Syncer) analyzeAbandonedBranches() (*AbandonedBranchReport, error) {
if mainBranch != "" {
mainInfo, err := s.getBranchInfo(mainBranch)
if err == nil {
- report.MainBranchUpdated = mainInfo.LastCommit.After(time.Now().AddDate(-1, 0, 0))
+ // Consider project active if main branch has commits within last 3 years
+ report.MainBranchUpdated = mainInfo.LastCommit.After(time.Now().AddDate(-3, 0, 0))
report.MainBranchLastCommit = mainInfo.LastCommit
}
}
- // Only analyze if main branch is active
+ // Only analyze if main branch is active (has commits within last 3 years)
if !report.MainBranchUpdated {
return report, nil
}