Say a pull request the forge never announced as one, with what to do (hq issue 347)
mesh-delivery now says a pull request on a base that requires the merge check, with none on its head for ten minutes, as a stalled line in state unannounced, which D14 raises as delivery.<id>.stalled. No delivery exists for it, so the generic words — stop it, release it — named an act that does not apply. It now says the pull request has had no merge check, why, and that a new commit on its branch is announced and checked.
This commit is contained in:
@@ -748,6 +748,22 @@ func stalledWords(l stalledLine, o conditions.Observation) (headline, explanatio
|
||||
actions []conditions.Action) {
|
||||
repository, _, _ := strings.Cut(l.ID, "@")
|
||||
name := repoName(repository)
|
||||
if l.State == "unannounced" {
|
||||
// A pull request the forge never announced (novox/hq issue 347): no delivery exists, so there is nothing to
|
||||
// stop, release or close; a new commit on its branch is announced and checked.
|
||||
long := "for too long"
|
||||
if d, err := time.ParseDuration(l.For); err == nil {
|
||||
long = "for " + humanDuration(d)
|
||||
}
|
||||
if o.Resolver == conditions.ResolverOperator {
|
||||
needs = "push a new commit to its branch; the forge announces it and the mesh checks it."
|
||||
}
|
||||
return fmt.Sprintf("A pull request of %s has had no merge check %s", name, long),
|
||||
fmt.Sprintf("A pull request of %s has been open %s on a branch that requires the merge check, and the "+
|
||||
"mesh was never asked to check it: the forge never announced it. It cannot merge until it is checked.",
|
||||
name, long),
|
||||
fmt.Sprintf("The pull request of %s has a merge check now, or is closed", name), needs, nil
|
||||
}
|
||||
held := l.State
|
||||
if held == "" {
|
||||
held = "held"
|
||||
|
||||
Reference in New Issue
Block a user