Files
mesh-delivery/modules/mesh-delivery-checker/internal/check/line.go
T

20 lines
399 B
Go

package check
import (
"fmt"
"git.novox.be/novox/mesh-sdk/go/delivery"
)
// Line is the words of a status for one pull request of a case (ADR 0447 clause 3, ADR 0484 clause 7).
func Line(v delivery.Verdict, cs *Case, p Pull, builds []BuildNote) string {
return fmt.Sprintf("%s: %s", v.State, short12(p.Head))
}
func short12(s string) string {
if len(s) > 12 {
return s[:12]
}
return s
}