• Mark Chao's avatar
    Use max of approvals_before_merge between project and MR at runtime · 61741b1a
    Mark Chao authored
    Previously, MR#approvals_before_merge is nil when it is <= project
    (from `clamp_approvals_before_merge`).
    This changed in f480d145,
    which would always persist a min value.
    This caused regression that updating MR would fail if project's
    value is increased later on.
    
    The relationship between value being nil and validation can be easily
    overlooked.
    
    Removing validation and taking the max of the two makes logic clearer.
    61741b1a
merge_request_spec.rb 31.7 KB