Merge pull request 'mesh-cli at go/v0.1.9, and the unannounced pull request's number (hq ADR 0272, issue 347)' (#160) from feat/272-the-tagged-sdk-and-the-pull-requests-number into main

This commit was merged in pull request #160.
This commit is contained in:
2026-10-09 11:54:32 +00:00
5 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ module mesh-cli
go 1.22 go 1.22
require git.novox.be/novox/mesh-sdk/go v0.1.8-0.20261009103748-a5a040c9049b require git.novox.be/novox/mesh-sdk/go v0.1.9
+2 -2
View File
@@ -1,2 +1,2 @@
git.novox.be/novox/mesh-sdk/go v0.1.8-0.20261009103748-a5a040c9049b h1:HmasScQ02QeFlAFDnmRCOEserbtDJJtutK+acBmGlNs= git.novox.be/novox/mesh-sdk/go v0.1.9 h1:2zq9tbwoXEYi+dDBxPoeNmn39KdRRKRp8CK33F4LWd0=
git.novox.be/novox/mesh-sdk/go v0.1.8-0.20261009103748-a5a040c9049b/go.mod h1:GFuZUElBZ9A++mxgIKo97aXXo+kV0uJ/UkbhQPPIbrY= git.novox.be/novox/mesh-sdk/go v0.1.9/go.mod h1:GFuZUElBZ9A++mxgIKo97aXXo+kV0uJ/UkbhQPPIbrY=
@@ -94,7 +94,7 @@ func (h *Holder) uncheckedLines(now time.Time) []StalledLine {
if h.deliveries[id] != nil || now.Sub(u.first) < UncheckedAfter { if h.deliveries[id] != nil || now.Sub(u.first) < UncheckedAfter {
continue continue
} }
out = append(out, StalledLine{ID: id, State: Unannounced, For: now.Sub(u.first).Round(time.Second).String(), out = append(out, StalledLine{ID: id, Number: u.pull.Number, State: Unannounced, For: now.Sub(u.first).Round(time.Second).String(),
Bound: UncheckedAfter.String(), Bound: UncheckedAfter.String(),
H2: "none: the forge never announced it, so there is no delivery to close — the operator's", H2: "none: the forge never announced it, so there is no delivery to close — the operator's",
Says: fmt.Sprintf("%s/%s#%d is open on %s, which requires the merge check, and its head has had no merge "+ Says: fmt.Sprintf("%s/%s#%d is open on %s, which requires the merge check, and its head has had no merge "+
@@ -31,6 +31,9 @@ func TestAPullRequestNobodyCheckedIsAStalledDelivery(t *testing.T) {
!strings.Contains(lines[0].Says, "no merge check") || !strings.HasPrefix(lines[0].H2, "none") { !strings.Contains(lines[0].Says, "no merge check") || !strings.HasPrefix(lines[0].H2, "none") {
t.Fatalf("an unchecked pull request on a base requiring only mesh/repo-check reads %+v", lines) t.Fatalf("an unchecked pull request on a base requiring only mesh/repo-check reads %+v", lines)
} }
if lines[0].Number != 243 {
t.Fatalf("the line does not name the pull request's number: %+v", lines[0])
}
if lines[0].For != "11m0s" { if lines[0].For != "11m0s" {
t.Fatalf("its time is not counted from when this owner first saw it: %s", lines[0].For) t.Fatalf("its time is not counted from when this owner first saw it: %s", lines[0].For)
} }
@@ -152,12 +152,14 @@ func (h *Holder) Groups(all bool) []GroupLine {
// StalledLine is one delivery past its state's bound. // StalledLine is one delivery past its state's bound.
type StalledLine struct { type StalledLine struct {
ID string `json:"id"` ID string `json:"id"`
State State `json:"state"` // Number is the pull request's, for a head the forge never announced: the condition names it (novox/hq issue 347).
For string `json:"for"` Number int `json:"number,omitempty"`
Bound string `json:"bound"` State State `json:"state"`
H2 string `json:"h2"` For string `json:"for"`
Says string `json:"says"` Bound string `json:"bound"`
H2 string `json:"h2"`
Says string `json:"says"`
} }
// Stalled is the `stalled` verb: what the controller's self-check raises as `delivery.<id>.stalled`. // Stalled is the `stalled` verb: what the controller's self-check raises as `delivery.<id>.stalled`.