Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

types/pipeline: restore ErrorMessage and ErrorDetails

Signed-off-by: dawn <dawn@tangled.org>

dawn (Jul 6, 2026, 6:38 PM +0300) 7f67a8bb b727ac85

+19
+19
types/pipeline.go
··· 46 46 return *w.CiPipeline_Workflow.Error 47 47 } 48 48 49 + func (w WorkflowStatus) ErrorMessage() string { 50 + line, _, _ := strings.Cut(w.Error(), "\n") 51 + return line 52 + } 53 + 54 + func (w WorkflowStatus) ErrorDetails() string { 55 + _, rest, _ := strings.Cut(w.Error(), "\n") 56 + if rest == "" { 57 + return "" 58 + } 59 + 60 + const truncateTo = 15 61 + lines := strings.Split(rest, "\n") 62 + if len(lines) <= truncateTo { 63 + return rest 64 + } 65 + return strings.Join(lines[:truncateTo], "\n") + "\n…" 66 + } 67 + 49 68 func (w WorkflowStatus) Status() StatusKind { 50 69 if w.CiPipeline_Workflow == nil { 51 70 return ""