Skip to content

Commit

Permalink
Fix Github PR comment formatting (#56078)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders authored Jan 28, 2020
1 parent 1488aa9 commit ba151fe
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions vars/githubPr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ba151fe

Please sign in to comment.