Skip to content

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?

What are the relevant issue numbers?

Closes #3142 (closed)

Edited by Micael Bergeron

Merge request reports