fix the approvals_before_merge project fallback
What does this MR do?
This fix #3142 (closed) by making sure we use the correct target_project when evaluating the approvals count.
Are there points in the code the reviewer needs to double check?
The current tests are done using a reflective MR (target_project == source_project), but I didn't find tests for MR that target a fork. The current change complies with the current test, but extensive tests could be added.
Why was this MR needed?
For a forked MR, the fallback project was always the project's fork, not the currently targeted project. This fixes this.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #3142 (closed)
Edited by Micael Bergeron