mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
Improve bot messaging on CI failures.
This commit is contained in:
parent
95f202a7e3
commit
2a0adaf542
1 changed files with 4 additions and 4 deletions
|
@ -339,16 +339,16 @@ class TestFailure(TestResult):
|
||||||
command = self.format_command()
|
command = self.format_command()
|
||||||
|
|
||||||
if self.summary:
|
if self.summary:
|
||||||
reason = 'error'
|
reason = 'the error'
|
||||||
else:
|
else:
|
||||||
reason = 'error' if len(self.messages) == 1 else 'errors'
|
reason = '1 error' if len(self.messages) == 1 else '%d errors' % len(self.messages)
|
||||||
|
|
||||||
if help_link:
|
if help_link:
|
||||||
help_link_markup = ' [[?](%s)]' % help_link
|
help_link_markup = ' [[explain](%s)]' % help_link
|
||||||
else:
|
else:
|
||||||
help_link_markup = ''
|
help_link_markup = ''
|
||||||
|
|
||||||
title = 'The test `%s`%s failed with the following %s:' % (command, help_link_markup, reason)
|
title = 'The test `%s`%s failed with %s:' % (command, help_link_markup, reason)
|
||||||
|
|
||||||
return title
|
return title
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue