Fix default merge failure reports

Commit 385d11e2ed moved the logic
that performs report formatting into the reporters themselves.  But
it also contained a logic change to the formatting.

Previously, if an item was not mergeable, it was reported without
a job list, regardless if the merge-failure or standard failure
reporter was used.  With that change, if a pipeline specified a
merge-failure message reporter, it would not format the job list,
but if no merge-failure reporter was supplied, and the standard
failure reporter was used, the standard failure reporter would not
check whether a merge-failure happened and instead always try to
format the job list.

Change-Id: If65d4f64d6558a544d3d0c2cc0b32ad7786a6bcd
This commit is contained in:
James E. Blair
2016-02-09 08:44:52 -08:00
parent 52a249718e
commit f760f0e49f
2 changed files with 27 additions and 0 deletions

View File

@@ -84,6 +84,8 @@ class BaseReporter(object):
def _formatItemReportFailure(self, pipeline, item):
if item.dequeued_needing_change:
msg = 'This change depends on a change that failed to merge.\n'
elif not pipeline.didMergerSucceed(item):
msg = pipeline.merge_failure_message
else:
msg = (pipeline.failure_message + '\n\n' +
self._formatItemReportJobs(pipeline, item))