Show More
@@ -2060,6 +2060,8 b' class MergeCheck(object):' | |||||
2060 | self.error_details = OrderedDict() |
|
2060 | self.error_details = OrderedDict() | |
2061 | self.source_commit = AttributeDict() |
|
2061 | self.source_commit = AttributeDict() | |
2062 | self.target_commit = AttributeDict() |
|
2062 | self.target_commit = AttributeDict() | |
|
2063 | self.reviewers_count = 0 | |||
|
2064 | self.observers_count = 0 | |||
2063 |
|
2065 | |||
2064 | def __repr__(self): |
|
2066 | def __repr__(self): | |
2065 | return '<MergeCheck(possible:{}, failed:{}, errors:{})>'.format( |
|
2067 | return '<MergeCheck(possible:{}, failed:{}, errors:{})>'.format( | |
@@ -2121,11 +2123,12 b' class MergeCheck(object):' | |||||
2121 | # review status, must be always present |
|
2123 | # review status, must be always present | |
2122 | review_status = pull_request.calculated_review_status() |
|
2124 | review_status = pull_request.calculated_review_status() | |
2123 | merge_check.review_status = review_status |
|
2125 | merge_check.review_status = review_status | |
|
2126 | merge_check.reviewers_count = pull_request.reviewers_count | |||
|
2127 | merge_check.observers_count = pull_request.observers_count | |||
2124 |
|
2128 | |||
2125 | status_approved = review_status == ChangesetStatus.STATUS_APPROVED |
|
2129 | status_approved = review_status == ChangesetStatus.STATUS_APPROVED | |
2126 | if not status_approved: |
|
2130 | if not status_approved and merge_check.reviewers_count: | |
2127 | log.debug("MergeCheck: cannot merge, approval is pending.") |
|
2131 | log.debug("MergeCheck: cannot merge, approval is pending.") | |
2128 |
|
||||
2129 | msg = _('Pull request reviewer approval is pending.') |
|
2132 | msg = _('Pull request reviewer approval is pending.') | |
2130 |
|
2133 | |||
2131 | merge_check.push_error('warning', msg, cls.REVIEW_CHECK, review_status) |
|
2134 | merge_check.push_error('warning', msg, cls.REVIEW_CHECK, review_status) |
General Comments 0
You need to be logged in to leave comments.
Login now