Skip to content

Commit

Permalink
Fix Github PR comment formatting (#56078) (#56093)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders authored Jan 28, 2020
1 parent e74f6c5 commit bc1058b
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 bc1058b

Please sign in to comment.