• Sean McGivern's avatar
    Ensure MR approvals don't get stuck · ee751a59
    Sean McGivern authored
    The potential approvers of an MR are:
    
    - The users in the approvers list (excluding other permissions, as long
      as they can see the MR).
    - Users with developer access or higher on the project or the group
      containing the project.
    
    This number is reduced by:
    
    - The author not being able to approve their own MR.
    - Users who have already approved the MR.
    
    If the number of potential approvers is less than the number of
    approvals left by the normal count, pick the number of potential
    approvers instead, so the MR isn't 'stuck' in a state where it needs
    approval but no-one can approve it.
    ee751a59
merge_request.rb 20.9 KB