Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Say what each change is waiting for in the list

7cc36ba0f4ba96d3f4938b13758b2cc20c22375a · Keenan Nemetz · 4d ago · parent 946d2fd4

Say what each change is waiting for in the list

A change spends most of its life in states "open" cannot describe: held for a
maintainer to allow CI, running its checks, failed, waiting for a reviewer,
conflicting with its base. The list now says which of those it is, in one
column, with a tooltip that explains the label.

The answer comes from facts a list can afford: the approvals it already counts,
one batched run-queue query for every head on the page, the contributor
allowance (one ref listing, not one per row), and — only for a change that would
otherwise read as ready — whether it still merges into its base. The full
landing plan stays on the detail page.

The rest of the row follows the issue list: the author and opening moved under
the title, the comment count sits at the end of that line, and the last column
is "Updated", the newest commit over the request's directory. The list sorts by
it. The separate Author, Approvals and Age columns are gone.

Closes #194

ci/runs/candidates_test.go +35

@@ -89,3 +89,38 @@ func TestHasPendingTracksQueuedWork(t *testing.T) {
89 89 t.Fatalf("HasPending after cancel = %t, %v; want false", pending, err)
90 90 }
91 91 }
92
93 // TestForSHAsAnswersForAPageOfCommits: the change list asks about every head it
94 // shows in one query, and gets the same per-commit answer ForSHA gives.
95 func TestForSHAsAnswersForAPageOfCommits(t *testing.T) {
96 t.Parallel()
97 s := newStore(t)
98 now := time.Now().UTC()
99 first := run("1", "demo", now)
100 first.SHA = "1111111111111111111111111111111111111111"
101 second := run("2", "demo", now)
102 second.SHA = "2222222222222222222222222222222222222222"
103 second.Job = "lint"
104
105 for _, r := range []Run{first, second} {
106 if _, err := s.Enqueue(r, nil); err != nil {
107 t.Fatal(err)
108 }
109 }
110 got, err := s.ForSHAs("demo", []string{first.SHA, second.SHA, "3333333333333333333333333333333333333333"})
111 if err != nil {
112 t.Fatal(err)
113 }
114 if len(got) != 2 {
115 t.Fatalf("ForSHAs = %d commits, want 2", len(got))
116 }
117 if r := got[first.SHA][Key(first.Workflow, first.Job)]; r == nil || r.ID != first.ID {
118 t.Fatalf("first commit = %+v, want run %s", got[first.SHA], first.ID)
119 }
120 if r := got[second.SHA][Key(second.Workflow, second.Job)]; r == nil || r.ID != second.ID {
121 t.Fatalf("second commit = %+v, want run %s", got[second.SHA], second.ID)
122 }
123 if _, ok := got["3333333333333333333333333333333333333333"]; ok {
124 t.Fatal("ForSHAs invented a commit nobody ran")
125 }
126 }