@@ -156,17 +156,23 @@ func GeneratePRCommentMarkdown(w io.Writer, testReport *TestReport, maxPassRatio
156156func buildSettingsTable (testReport * TestReport , maxPassRatio float64 ) [][]string {
157157 rows := [][]string {
158158 {"**Setting**" , "**Value**" },
159- {"Project" , testReport .GoProject },
160- {"Max Pass Ratio" , fmt .Sprintf ("%.2f%%" , maxPassRatio * 100 )},
161- {"Test Run Count" , fmt .Sprintf ("%d" , testReport .TestRunCount )},
162- {"Race Detection" , fmt .Sprintf ("%t" , testReport .RaceDetection )},
163159 }
160+
161+ if testReport .GoProject != "" {
162+ rows = append (rows , []string {"Project" , testReport .GoProject })
163+ }
164+
165+ rows = append (rows , []string {"Max Pass Ratio" , fmt .Sprintf ("%.2f%%" , maxPassRatio * 100 )})
166+ rows = append (rows , []string {"Test Run Count" , fmt .Sprintf ("%d" , testReport .TestRunCount )})
167+ rows = append (rows , []string {"Race Detection" , fmt .Sprintf ("%t" , testReport .RaceDetection )})
168+
164169 if len (testReport .ExcludedTests ) > 0 {
165170 rows = append (rows , []string {"Excluded Tests" , strings .Join (testReport .ExcludedTests , ", " )})
166171 }
167172 if len (testReport .SelectedTests ) > 0 {
168173 rows = append (rows , []string {"Selected Tests" , strings .Join (testReport .SelectedTests , ", " )})
169174 }
175+
170176 return rows
171177}
172178
0 commit comments