Resolve "Applied merge request approval rules changing post-merge"
What does this MR do and why?
The current issue is that we want to return the ApprovalMergeRequestRule
if it overrides the source rule. The scope (protected branch rule is applicable to) of the source rule doesn't apply anymore if it's overridden as ApprovalMergeRequestRule
doesn't have scope. This is the behavior we decided in #199795 (closed).
However, we only checked overridden, and in the case when any of the rules are overridden (even if it doesn't apply to our branch, then it will be shown). To solve this, we can use the attribute modified_from_project_rule
as it is only set on update and not creation, so after merge, this is not going to be false.
Related to #373727 (closed)
Edited by Marc Shaw