Skip conflict check for auto merge
What does this MR do and why?
When we are changing merge_status to can_be_merged, and auto merge is set, then the auto merge worker will be automatically run.
With this worker now being run, we can now allow the auto merge to be set when the merge_status is not in a can_be_merged state.
To Test:
To test this, we can run to set auto merge directly on the original push
➜ gitlab git:(skip_conflict_check) echo "Test change at $(date)" >> test-file.txt && \
git add test-file.txt && \
git commit -m "chore: fake change to test MR issue $(date +%Y-%m-%d)" && \
git push -o merge_request.create \
-o merge_request.target=master \
-o merge_request.title="Generate MR to test automerge $(date +%Y-%m-%d-%H%M%S)" \
-o merge_request.remove_source_branch=true \
-o merge_request.auto_merge=true \
origin temp_delete
Also check the skip_conflict_check is now in the list as true
mr = MergeRequest.last
mr.update!(merge_status: :checking)
auto = mr.default_auto_merge_strategy
mr.skipped_auto_merge_checks(
auto_merge_strategy: auto
)
Edited by Marc Shaw