diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py --- a/rhodecode/controllers/pullrequests.py +++ b/rhodecode/controllers/pullrequests.py @@ -442,7 +442,7 @@ class PullrequestsController(BaseRepoCon c.comments = cc_model.get_comments(c.rhodecode_db_repo.repo_id, pull_request=pull_request_id) - # changeset(pull-request) status calulation based on reviewers + # (badly named) pull-request status calculation based on reviewer votes c.current_changeset_status = cs_model.calculate_status( c.pull_request_reviewers, ) diff --git a/rhodecode/model/changeset_status.py b/rhodecode/model/changeset_status.py --- a/rhodecode/model/changeset_status.py +++ b/rhodecode/model/changeset_status.py @@ -64,11 +64,11 @@ class ChangesetStatusModel(BaseModel): def calculate_status(self, statuses_by_reviewers): """ - leading one wins, if number of occurrences are equal than weaker wins + approved if consensus + (old description: leading one wins, if number of occurrences are equal than weaker wins) :param statuses_by_reviewers: """ - status = None votes = defaultdict(int) reviewers_number = len(statuses_by_reviewers) for user, statuses in statuses_by_reviewers: diff --git a/rhodecode/templates/pullrequests/pullrequest_show.html b/rhodecode/templates/pullrequests/pullrequest_show.html --- a/rhodecode/templates/pullrequests/pullrequest_show.html +++ b/rhodecode/templates/pullrequests/pullrequest_show.html @@ -37,13 +37,13 @@