File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323MESSAGE = """\
2424 :warning: **Buildbot failure** :warning:
2525
26- The buildbot **{buildername}** ({tier}) has failed when building commit {sha} (https://github.com/python/cpython/commit/{sha}).
26+ The buildbot **{buildername}** ({tier}) has failed when building commit [ {sha:.12}] (https://github.com/python/cpython/commit/{sha}).
2727
28- You can take a look at the buildbot page here:
29-
30- {build_url}
31-
32- ```
33- {failed_test_text}
34- ```
28+ [Jump to the build page.]({build_url})
3529"""
3630
3731
@@ -159,9 +153,12 @@ def createReport(
159153 builder ["builderid" ], build ["number" ]
160154 ),
161155 sha = sha ,
162- failed_test_text = logs .format_failing_tests (),
163156 )
164157
158+ failed_test_text = logs .format_failing_tests ()
159+ if failed_test_text and failed_test_text .strip ():
160+ message += "\n ```\n {}\n ```\n " .format (failed_test_text )
161+
165162 payload = {"content" : message , "embeds" : []}
166163
167164 return self ._http .post ("" , json = payload )
You can’t perform that action at this time.
0 commit comments