[go: up one dir, main page]

Skip to content

Number of required approvals is counterintuitive on the merge request list

Currently, we display the number of approvals / the number of required approvals as:

Screen_Shot_2020-04-04_at_12.52.32_PM

which means 0 users out of eligible 3 approved.

However, it doesn't mean that exactly 3 users are required to go to the merge request and click approve. There are cases when a single user can satisfy all the rules and approve the merge request:

Screen_Shot_2020-04-04_at_12.59.40_PM

In this case, we'll see that approval from 1 user out of 3 approved the whole merge request:

Screen_Shot_2020-04-04_at_1.00.28_PM

On the other hand, there are cases when 4 users can't approve a merge request because they couldn't satisfy the rules:

Screen_Shot_2020-04-04_at_1.04.37_PM

In this case, we'll see that approval from 4 users out of 3 couldn't approve the whole merge request:

Screen_Shot_2020-04-04_at_1.06.12_PM

Summary

In the cases above, the number of required approvals doesn't tell us any useful information but actually can be confusing:

Proposal

#213435 (comment 329230184)

First and foremost, we should prioritize displaying required approvals information. These block merge requests and are more important than optional approvals.

Needs approval Optional Approved
The first count is the number of required approvals remaining, across all approval rules. The second count, in the tooltip, is the number of required approvers that have given their approval. Approval is optional, meaning that there are no required approval rules. The tooltip count is the number of approvers, both required and optional.
image We don't show anything, like today. image
image image

Here's an example of how this would work. Imagine the following approval rules:

  1. FE: 1 required • Eligible approvers: John, Alice
  2. Database: 2 required • Eligible approvers: John, Alice
  3. BE: 1 required • Eligible approver: Alice

Now, depending on who approves, this is what would happen:

  1. If no one has approved, it would read in the list 4 left and the tooltip Required approvals.
  2. If John approves, it would read 2 left and the tooltip Required approvals (1 given).
  3. If Alice then approves after John, it would read Approved and the tooltip 2 approvers.
Edited by 🤖 GitLab Bot 🤖