mesh-issues: say a delivered fix left in fixing, and flag a stale claim (hq issue 483)
mesh/merge-gate pass: builds mesh-issues → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate pass: builds mesh-issues → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request
The operator found 13 issues in fixing whose fix was delivered hours before: their pull requests were linked, not in fixed-by, so their delivery was never measured, and nothing said an issue left there or a worker gone.
This commit is contained in:
@@ -348,6 +348,9 @@ type Moved struct {
|
||||
Since *time.Time `json:"since,omitempty"`
|
||||
// TookOverFrom is the worker a take-over took the issue over from.
|
||||
TookOverFrom string `json:"took-over-from,omitempty"`
|
||||
// StaleClaim says the worker taken over from had a stale claim: nothing done on it past worker-stale-after and
|
||||
// no pull request open, so no reason was needed (novox/hq issue 483).
|
||||
StaleClaim bool `json:"stale-claim,omitempty"`
|
||||
// Released is the worker whose work on it the move ended.
|
||||
Released string `json:"released,omitempty"`
|
||||
Said string `json:"said"`
|
||||
@@ -518,7 +521,13 @@ func (t *Tracker) move(by string, a MoveAsk) (*Moved, error) {
|
||||
if takeOver != "" {
|
||||
body["take-over"] = takeOver
|
||||
}
|
||||
out.Said += fmt.Sprintf(" Taken over from %s; noted on the issue.", work.from)
|
||||
if work.staleClaim {
|
||||
out.StaleClaim, body["stale-claim"] = true, true
|
||||
out.Said += fmt.Sprintf(" Taken over from %s, whose claim was a stale claim (nothing done on it for %s and no "+
|
||||
"pull request open); noted on the issue.", work.from, staleAfter)
|
||||
} else {
|
||||
out.Said += fmt.Sprintf(" Taken over from %s; noted on the issue.", work.from)
|
||||
}
|
||||
}
|
||||
if work.released != "" {
|
||||
body["released"] = work.released
|
||||
@@ -713,6 +722,8 @@ type ListAsk struct {
|
||||
Needs string
|
||||
// Ready, when set, keeps only the issues ready (true) or not ready (false).
|
||||
Ready *bool
|
||||
// Flag keeps only the issues delivered and not resolved, or the stale claims (novox/hq issue 483).
|
||||
Flag string
|
||||
}
|
||||
|
||||
// Row is one issue in a list: short enough to read in a chat.
|
||||
@@ -733,6 +744,10 @@ type Row struct {
|
||||
Worker string `json:"worker,omitempty"`
|
||||
Since *time.Time `json:"since,omitempty"`
|
||||
Stale bool `json:"stale,omitempty"`
|
||||
// DeliveredNotResolved says it is in fixing with every fix it names delivered; StaleClaim that its worker
|
||||
// did nothing on it for worker-stale-after and no pull request of it is open (novox/hq issue 483).
|
||||
DeliveredNotResolved bool `json:"delivered-not-resolved,omitempty"`
|
||||
StaleClaim bool `json:"stale-claim,omitempty"`
|
||||
}
|
||||
|
||||
// Listed is the answer to a list.
|
||||
@@ -771,6 +786,12 @@ func (t *Tracker) List(a ListAsk) (*Listed, error) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
flag := strings.TrimSpace(a.Flag)
|
||||
if flag != "" {
|
||||
if _, err := oneOf("flag", flag, Flags); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
limit := a.Limit
|
||||
if limit <= 0 {
|
||||
limit = 50
|
||||
@@ -799,6 +820,9 @@ func (t *Tracker) List(a ListAsk) (*Listed, error) {
|
||||
if needs != "" && is.Needs != needs {
|
||||
continue
|
||||
}
|
||||
if flag != "" && !hasFlag(is, flag, now, staleAfter) {
|
||||
continue
|
||||
}
|
||||
ready := isReady(all, is)
|
||||
if a.Ready != nil && ready != *a.Ready {
|
||||
continue
|
||||
@@ -817,6 +841,8 @@ func (t *Tracker) List(a ListAsk) (*Listed, error) {
|
||||
since := c.Since
|
||||
row.Worker, row.Since, row.Stale = c.By, &since, c.stale(now, staleAfter)
|
||||
}
|
||||
row.DeliveredNotResolved = deliveredNotResolved(is)
|
||||
row.StaleClaim = staleClaim(is, now, staleAfter)
|
||||
out.Rows = append(out.Rows, row)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user