As demonstrated via 357faf4a, using $CI_BUILD_REF is DANGEROUS and can lead to conflicts. Making use of $CI_PIPELINE_ID keeps all the jobs in pipeline isolated.
Check out, review, and merge locally
Step 1. Fetch and check out the branch for this merge request