devapp: make it easier to see only release-blocker issues

Fixes #32418

Change-Id: I834858b76c08c1946fa897a011b25ea381619dba
Reviewed-on: https://go-review.googlesource.com/c/build/+/182217
Reviewed-by: Andrew Bonventre <andybons@golang.org>
diff --git a/devapp/release.go b/devapp/release.go
index acde6ce..bf575bc 100644
--- a/devapp/release.go
+++ b/devapp/release.go
@@ -100,11 +100,25 @@
 	return i.Issue.HasLabel("release-blocker")
 }
 
+func (i *item) CurrentBlocker() bool {
+	return i.Issue.Milestone.Title == curMilestoneTitle && i.ReleaseBlocker()
+}
+
+func (i *item) EarlyInCycle() bool {
+	return !i.ReleaseBlocker() && i.Issue.HasLabel("early-in-cycle")
+}
+
 type itemsBySummary []item
 
 func (x itemsBySummary) Len() int      { return len(x) }
 func (x itemsBySummary) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
 func (x itemsBySummary) Less(i, j int) bool {
+	// Sort release-blocker issues to the front
+	ri := x[i].Issue != nil && x[i].Issue.HasLabel("release-blocker")
+	rj := x[j].Issue != nil && x[j].Issue.HasLabel("release-blocker")
+	if ri != rj {
+		return ri
+	}
 	// Sort performance issues to the end.
 	pi := x[i].Issue != nil && x[i].Issue.HasLabel("Performance")
 	pj := x[j].Issue != nil && x[j].Issue.HasLabel("Performance")