Show More
@@ -442,7 +442,7 b' class PullrequestsController(BaseRepoCon' | |||
|
442 | 442 | c.comments = cc_model.get_comments(c.rhodecode_db_repo.repo_id, |
|
443 | 443 | pull_request=pull_request_id) |
|
444 | 444 | |
|
445 |
# |
|
|
445 | # (badly named) pull-request status calculation based on reviewer votes | |
|
446 | 446 | c.current_changeset_status = cs_model.calculate_status( |
|
447 | 447 | c.pull_request_reviewers, |
|
448 | 448 | ) |
@@ -64,11 +64,11 b' class ChangesetStatusModel(BaseModel):' | |||
|
64 | 64 | |
|
65 | 65 | def calculate_status(self, statuses_by_reviewers): |
|
66 | 66 | """ |
|
67 | leading one wins, if number of occurrences are equal than weaker wins | |
|
67 | approved if consensus | |
|
68 | (old description: leading one wins, if number of occurrences are equal than weaker wins) | |
|
68 | 69 | |
|
69 | 70 | :param statuses_by_reviewers: |
|
70 | 71 | """ |
|
71 | status = None | |
|
72 | 72 | votes = defaultdict(int) |
|
73 | 73 | reviewers_number = len(statuses_by_reviewers) |
|
74 | 74 | for user, statuses in statuses_by_reviewers: |
@@ -37,13 +37,13 b'' | |||
|
37 | 37 | <div class="input"> |
|
38 | 38 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
39 | 39 | %if c.current_changeset_status: |
|
40 | <div title="${_('Pull request status')}" class="changeset-status-lbl"> | |
|
40 | <div title="${_('Pull request status calculated from votes')}" class="changeset-status-lbl"> | |
|
41 | 41 | %if c.pull_request.is_closed(): |
|
42 | 42 | ${_('Closed')}, |
|
43 | 43 | %endif |
|
44 | 44 | ${h.changeset_status_lbl(c.current_changeset_status)} |
|
45 | 45 | </div> |
|
46 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> | |
|
46 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" title="${_('Pull request status calculated from votes')}"/></div> | |
|
47 | 47 | %endif |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now