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:
@@ -2,4 +2,4 @@ module mesh-cli
|
||||
|
||||
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
|
||||
|
||||
@@ -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.8-0.20261009103748-a5a040c9049b/go.mod h1:GFuZUElBZ9A++mxgIKo97aXXo+kV0uJ/UkbhQPPIbrY=
|
||||
git.novox.be/novox/mesh-sdk/go v0.1.9 h1:2zq9tbwoXEYi+dDBxPoeNmn39KdRRKRp8CK33F4LWd0=
|
||||
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 {
|
||||
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(),
|
||||
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 "+
|
||||
|
||||
@@ -31,6 +31,9 @@ func TestAPullRequestNobodyCheckedIsAStalledDelivery(t *testing.T) {
|
||||
!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)
|
||||
}
|
||||
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" {
|
||||
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.
|
||||
type StalledLine struct {
|
||||
ID string `json:"id"`
|
||||
State State `json:"state"`
|
||||
For string `json:"for"`
|
||||
Bound string `json:"bound"`
|
||||
H2 string `json:"h2"`
|
||||
Says string `json:"says"`
|
||||
ID string `json:"id"`
|
||||
// Number is the pull request's, for a head the forge never announced: the condition names it (novox/hq issue 347).
|
||||
Number int `json:"number,omitempty"`
|
||||
State State `json:"state"`
|
||||
For string `json:"for"`
|
||||
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`.
|
||||
|
||||
Reference in New Issue
Block a user