Fix Github PR comment formatting (#56078)

This commit is contained in:
Brian Seeders 2020-01-27 20:45:24 -05:00 committed by GitHub
parent 1488aa9eaf
commit ba151fea0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,23 +106,28 @@ def getTestFailuresMessage() {
}
def messages = []
messages << "---\n\n### [Test Failures](${env.BUILD_URL}testReport)"
failures.take(5).each { failure ->
failures.take(3).each { failure ->
messages << """
---
### [Test Failures](${env.BUILD_URL}testReport)
<details><summary>${failure.fullDisplayName}</summary>
[Link to Jenkins](${failure.url})
"""
```
${failure.stdOut}
```
</details>
if (failure.stdOut) {
messages << "\n#### Standard Out\n```\n${failure.stdOut}\n```"
}
---
"""
if (failure.stdErr) {
messages << "\n#### Standard Error\n```\n${failure.stdErr}\n```"
}
if (failure.stacktrace) {
messages << "\n#### Stack Trace\n```\n${failure.stacktrace}\n```"
}
messages << "</details>\n\n---"
}
if (failures.size() > 3) {