Commit 65747107 authored by Douwe Maan's avatar Douwe Maan Committed by Fatih Acet

Fix bug where merge widget wouldn't show up after resolving conflicts

parent c1514624
.mr-state-widget .mr-state-widget
= render 'projects/merge_requests/widget/heading' = render 'projects/merge_requests/widget/heading'
.mr-widget-body .mr-widget-body
-# After conflicts are resolved, the user is redirected back to the MR page.
-# There is a short window before background workers run and GitLab processes
-# the new push and commits, during which it will think the conflicts still exist.
-# We send this param to get the widget to treat the MR as having no more conflicts.
- resolved_conflicts = params[:resolved_conflicts]
- if @project.archived? - if @project.archived?
= render 'projects/merge_requests/widget/open/archived' = render 'projects/merge_requests/widget/open/archived'
- elsif @merge_request.commits.blank? - elsif @merge_request.commits.blank?
...@@ -9,7 +15,7 @@ ...@@ -9,7 +15,7 @@
= render 'projects/merge_requests/widget/open/missing_branch' = render 'projects/merge_requests/widget/open/missing_branch'
- elsif @merge_request.unchecked? - elsif @merge_request.unchecked?
= render 'projects/merge_requests/widget/open/check' = render 'projects/merge_requests/widget/open/check'
- elsif @merge_request.cannot_be_merged? && !params[:resolved_conflicts] - elsif @merge_request.cannot_be_merged? && !resolved_conflicts
= render 'projects/merge_requests/widget/open/conflicts' = render 'projects/merge_requests/widget/open/conflicts'
- elsif @merge_request.work_in_progress? - elsif @merge_request.work_in_progress?
= render 'projects/merge_requests/widget/open/wip' = render 'projects/merge_requests/widget/open/wip'
...@@ -19,7 +25,7 @@ ...@@ -19,7 +25,7 @@
= render 'projects/merge_requests/widget/open/not_allowed' = render 'projects/merge_requests/widget/open/not_allowed'
- elsif !@merge_request.mergeable_ci_state? && @pipeline && @pipeline.failed? - elsif !@merge_request.mergeable_ci_state? && @pipeline && @pipeline.failed?
= render 'projects/merge_requests/widget/open/build_failed' = render 'projects/merge_requests/widget/open/build_failed'
- elsif @merge_request.can_be_merged? - elsif @merge_request.can_be_merged? || resolved_conflicts
= render 'projects/merge_requests/widget/open/accept' = render 'projects/merge_requests/widget/open/accept'
- if mr_closes_issues.present? - if mr_closes_issues.present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment