Commit 90c5df04 authored by Pawel Chojnacki's avatar Pawel Chojnacki

fix conflict in merge_requests_controller.rb

parent 674a10bd
...@@ -10,14 +10,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -10,14 +10,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
before_action :module_enabled before_action :module_enabled
before_action :merge_request, only: [ before_action :merge_request, only: [
:edit, :update, :show, :diffs, :commits, :conflicts, :conflict_for_path, :pipelines, :merge, :merge_check, :edit, :update, :show, :diffs, :commits, :conflicts, :conflict_for_path, :pipelines, :merge, :merge_check,
<<<<<<< HEAD
:pipeline_status, :ci_environments_status, :toggle_subscription, :cancel_merge_when_pipeline_succeeds, :pipeline_status, :ci_environments_status, :toggle_subscription, :cancel_merge_when_pipeline_succeeds,
:remove_wip, :resolve_conflicts, :assign_related_issues, :commit_change_content, :remove_wip, :resolve_conflicts, :assign_related_issues, :commit_change_content,
# EE # EE
:approve, :approvals, :unapprove, :rebase :approve, :approvals, :unapprove, :rebase
=======
:pipeline_status, :ci_environments_status, :toggle_subscription, :cancel_merge_when_pipeline_succeeds, :remove_wip, :resolve_conflicts, :assign_related_issues, :commit_change_content
>>>>>>> upstream/master
] ]
before_action :validates_merge_request, only: [:show, :diffs, :commits, :pipelines] before_action :validates_merge_request, only: [:show, :diffs, :commits, :pipelines]
before_action :define_show_vars, only: [:show, :diffs, :commits, :conflicts, :conflict_for_path, :builds, :pipelines] before_action :define_show_vars, only: [:show, :diffs, :commits, :conflicts, :conflict_for_path, :builds, :pipelines]
...@@ -349,7 +345,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -349,7 +345,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
return access_denied! unless @merge_request.can_be_merged_by?(current_user) return access_denied! unless @merge_request.can_be_merged_by?(current_user)
return render_404 unless @merge_request.approved? return render_404 unless @merge_request.approved?
<<<<<<< HEAD
RebaseWorker.perform_async(@merge_request.id, current_user.id) RebaseWorker.perform_async(@merge_request.id, current_user.id)
render nothing: true, status: 200 render nothing: true, status: 200
...@@ -361,10 +356,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -361,10 +356,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
status = merge! status = merge!
=======
status = merge!
>>>>>>> upstream/master
if @merge_request.merge_error if @merge_request.merge_error
render json: { status: status, merge_error: @merge_request.merge_error } render json: { status: status, merge_error: @merge_request.merge_error }
else else
...@@ -441,17 +432,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -441,17 +432,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
metrics_url = metrics_url =
if can?(current_user, :read_environment, environment) && environment.has_metrics? if can?(current_user, :read_environment, environment) && environment.has_metrics?
<<<<<<< HEAD metrics_namespace_project_environment_deployment_path(environment.project.namespace,
metrics_namespace_project_environment_path(environment.project.namespace,
environment.project, environment.project,
environment, environment,
deployment) deployment)
=======
metrics_namespace_project_environment_deployment_path(environment.project.namespace,
environment.project,
environment,
deployment)
>>>>>>> upstream/master
end end
{ {
...@@ -750,7 +734,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -750,7 +734,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
return :failed return :failed
end end
<<<<<<< HEAD
merge_request_service = MergeRequests::MergeService.new(@project, current_user, merge_params) merge_request_service = MergeRequests::MergeService.new(@project, current_user, merge_params)
unless merge_request_service.hooks_validation_pass?(@merge_request) unless merge_request_service.hooks_validation_pass?(@merge_request)
...@@ -760,11 +743,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -760,11 +743,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
return :sha_mismatch if params[:sha] != @merge_request.diff_head_sha return :sha_mismatch if params[:sha] != @merge_request.diff_head_sha
@merge_request.update(merge_error: nil, squash: merge_params[:squash]) @merge_request.update(merge_error: nil, squash: merge_params[:squash])
=======
return :sha_mismatch if params[:sha] != @merge_request.diff_head_sha
@merge_request.update(merge_error: nil)
>>>>>>> upstream/master
if params[:merge_when_pipeline_succeeds].present? if params[:merge_when_pipeline_succeeds].present?
return :failed unless @merge_request.head_pipeline return :failed unless @merge_request.head_pipeline
......
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