add url to summary and check for optional values (#30993)

This commit is contained in:
Luces Huayhuaca 2022-05-31 13:48:07 -07:00 committed by GitHub
parent 367a850989
commit 70ddcc7d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,12 @@ func (b *Cloud) runTasksWithTaskResults(context *IntegrationContext, output Inte
title := fmt.Sprintf(`%s ⸺ %s`, t.TaskName, status)
output.SubOutput(title)
output.SubOutput(fmt.Sprintf("[dim]%s", t.Message))
if len(t.Message) > 0 {
output.SubOutput(fmt.Sprintf("[dim]%s", t.Message))
}
if len(t.URL) > 0 {
output.SubOutput(fmt.Sprintf("[dim]Details: %s", t.URL))
}
output.SubOutput("")
}