INNER CODE UNIT · Go

Classify

Bharath-code/git-scope · internal/attention/attention.go:54

func Classify(s model.RepoStatus, now time.Time) Tier {
	if s.ScanError != "" || s.Ahead > 0 || s.Behind > 0 {
		return Action
	}
	if s.IsDirty {
		return Watch
	}
	return Clean
}

// Stale reports whether a dirty repo has been left untouched past StaleThreshold.
// It never promotes a repo to a higher tier; it only nudges within-tier order.
func Stale(s model.RepoStatus, now time.Time) bool {
	return s.IsDirty && now.Sub(s.LastCommit) > StaleThreshold
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…