Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions master/custom/discord_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,9 @@
MESSAGE = """\
:warning: **Buildbot failure** :warning:

The buildbot **{buildername}** ({tier}) has failed when building commit {sha}(https://github.com/python/cpython/commit/{sha}).
The buildbot **{buildername}** ({tier}) has failed when building commit [{sha:.12}](https://github.com/python/cpython/commit/{sha}).

You can take a look at the buildbot page here:

{build_url}

```
{failed_test_text}
```
[Jump to the build page.]({build_url})
"""


Expand Down Expand Up @@ -159,9 +153,12 @@ def createReport(
builder["builderid"], build["number"]
),
sha=sha,
failed_test_text=logs.format_failing_tests(),
)

failed_test_text = logs.format_failing_tests()
if failed_test_text and failed_test_text.strip():
message += "\n```\n{}\n```\n".format(failed_test_text)

payload = {"content": message, "embeds": []}

return self._http.post("", json=payload)