@@ -51,7 +51,6 @@ const summaryTemplate = `
5151| <a href="{{ formatTaskLogURL $tr $pipelineRunName $namespace $logger }}">{{ formatTaskName $tr }}</a> | {{ $tr.GetDuration.String }} | {{ formatNamespace $tr }} | {{ formatStatus $tr }} | {{ formatDetails $tr }} | {{ formatNote $tr }} |
5252{{- end }}
5353
54- {{ formatFootnotes .TaskRuns }}
5554{{ if .ComponentSnapshotInfos}}
5655The group snapshot is generated for pr group {{ .PRGroup }} and the component snasphots as below:
5756| Component | Snapshot | BuildPipelineRun | PullRequest |
@@ -103,7 +102,6 @@ func FormatTestsSummary(taskRuns []*helpers.TaskRun, pipelineRunName string, nam
103102 "formatNote" : FormatNote ,
104103 "formatPipelineURL" : FormatPipelineURL ,
105104 "formatTaskLogURL" : FormatTaskLogURL ,
106- "formatFootnotes" : FormatFootnotes ,
107105 "formatPullRequestURL" : FormatPullRequestURL ,
108106 "formatRepoURL" : FormatRepoURL ,
109107 }
@@ -123,7 +121,6 @@ func FormatShortTestsSummary(pipelineRunName string, namespace string, component
123121 "formatStatus" : FormatStatus ,
124122 "formatDetails" : FormatDetails ,
125123 "formatPipelineURL" : FormatPipelineURL ,
126- "formatFootnotes" : FormatFootnotes ,
127124 "formatPullRequestURL" : FormatPullRequestURL ,
128125 "formatRepoURL" : FormatRepoURL ,
129126 }
@@ -197,24 +194,9 @@ func FormatStatus(taskRun *helpers.TaskRun) (string, error) {
197194 return emoji + " " + result .TestOutput .Result , nil
198195}
199196
200- // FormatTaskName accepts a TaskRun and returns a Markdown friendly representation of its name.
197+ // FormatTaskName accepts a TaskRun and returns its name.
201198func FormatTaskName (taskRun * helpers.TaskRun ) (string , error ) {
202- result , err := taskRun .GetTestResult ()
203- if err != nil {
204- return "" , err
205- }
206-
207- name := taskRun .GetPipelineTaskName ()
208-
209- if result == nil || result .TestOutput == nil {
210- return name , nil
211- }
212-
213- if result .TestOutput .Note == "" {
214- return name , nil
215- }
216-
217- return name + "[^" + name + "]" , nil
199+ return taskRun .GetPipelineTaskName (), nil
218200}
219201
220202// FormatNamespace accepts a TaskRun and returns a Markdown friendly representation of its test suite, if any.
@@ -285,26 +267,6 @@ func FormatNote(taskRun *helpers.TaskRun) (string, error) {
285267 return result .TestOutput .Note , nil
286268}
287269
288- // FormatResults accepts a list of TaskRuns and returns a Markdown friendly representation of their footnotes, if any.
289- func FormatFootnotes (taskRuns []* helpers.TaskRun ) (string , error ) {
290- footnotes := []string {}
291- for _ , tr := range taskRuns {
292- result , err := tr .GetTestResult ()
293- if err != nil {
294- return "" , err
295- }
296-
297- if result == nil || result .TestOutput == nil {
298- continue
299- }
300-
301- if result .TestOutput .Note != "" {
302- footnotes = append (footnotes , "[^" + tr .GetPipelineTaskName ()+ "]: " + result .TestOutput .Note )
303- }
304- }
305- return strings .Join (footnotes , "\n " ), nil
306- }
307-
308270// Console URL env vars (CONSOLE_URL, CONSOLE_URL_TASKLOG) use literal placeholder substitution only.
309271// Operator-controlled values are not evaluated as Go templates (avoids CWE-94 / server-side template injection).
310272//
0 commit comments