repo_checker: post passed comment only if previous failed comment.

This commit is contained in:
Jimmy Berry 2017-08-23 15:22:56 -05:00
parent ebd2f580ec
commit ad9f76bf46

View File

@ -187,6 +187,11 @@ class RepoChecker(ReviewBot.ReviewBot):
# Some checks in group did not pass, post comment.
self.comment_write(state='seen', result='failed', project=group,
message='\n'.join(comment).strip(), identical=True)
else:
# Post passed comment only if previous failed comment.
text = 'Previously reported problems have been resolved.'
self.comment_write(state='done', result='passed', project=group,
message=text, identical=True, only_replace=True)
return self.group_pass