INNER CODE UNIT · Go

Less

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

func Less(a, b model.Repo, now time.Time) bool {
	ta, tb := Classify(a.Status, now), Classify(b.Status, now)
	if ta != tb {
		return ta > tb
	}
	sa, sb := SubScore(a.Status, now), SubScore(b.Status, now)
	if sa != sb {
		return sa > sb
	}
	return a.Name < b.Name
}

// Summary is the workspace-level rollup shown in the dashboard header. Counts are
// per-signal, not a partition: a diverged repo is counted in both ToPush and Behind.
type Summary struct {
	ToPush int
	Behind int
	Dirty  int

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…