Skip to content
Snippets Groups Projects
Verified Commit e3d464d8 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Fix a wrong MR status when merge_when_build_succeeds &...

Fix a wrong MR status when merge_when_build_succeeds & project.only_allow_merge_if_build_succeeds are true

The issue was that `MergeRequest#mergeable?` returns false when the CI
state is not success and project.only_allow_merge_if_build_succeeds is
true. In this case `Projects::MergeRequestsController#merge` would
return the `:failed` status when enabling `merge_when_build_succeeds`,
thus leading to a weird state and the MR never automatically merged.

The fix is to disable the CI state check in the controller safeguard
that early return the `:failed` status.

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent dbbc3594
No related branches found
No related tags found
Loading
Pipeline #
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment