Commit 6d68923e authored by Andrew8xx8's avatar Andrew8xx8

human_merge_status replaced by human_merge_status_name

parent 52e0df5c
...@@ -73,7 +73,7 @@ class MergeRequestsController < ProjectResourceController ...@@ -73,7 +73,7 @@ class MergeRequestsController < ProjectResourceController
if @merge_request.unchecked? if @merge_request.unchecked?
@merge_request.check_if_can_be_merged @merge_request.check_if_can_be_merged
end end
render json: {merge_status: @merge_request.human_merge_status} render json: {merge_status: @merge_request.human_merge_status_name}
rescue Gitlab::SatelliteNotExistError rescue Gitlab::SatelliteNotExistError
render json: {merge_status: :no_satellite} render json: {merge_status: :no_satellite}
end end
......
...@@ -85,11 +85,6 @@ class MergeRequest < ActiveRecord::Base ...@@ -85,11 +85,6 @@ class MergeRequest < ActiveRecord::Base
scope :cared, ->(user) { where('assignee_id = :user OR author_id = :user', user: user.id) } scope :cared, ->(user) { where('assignee_id = :user OR author_id = :user', user: user.id) }
scope :by_milestone, ->(milestone) { where("milestone_id = :milestone_id", milestone_id: milestone) } scope :by_milestone, ->(milestone) { where("milestone_id = :milestone_id", milestone_id: milestone) }
# DEPRECATED: Please use human_merge_status_name instead
def human_merge_status
human_merge_status_name
end
def validate_branches def validate_branches
if target_branch == source_branch if target_branch == source_branch
errors.add :base, "You can not use same branch for source and target branches" errors.add :base, "You can not use same branch for source and target branches"
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
check_enable: #{@merge_request.unchecked? ? "true" : "false"}, check_enable: #{@merge_request.unchecked? ? "true" : "false"},
url_to_ci_check: "#{ci_status_project_merge_request_path(@project, @merge_request)}", url_to_ci_check: "#{ci_status_project_merge_request_path(@project, @merge_request)}",
ci_enable: #{@project.gitlab_ci? ? "true" : "false"}, ci_enable: #{@project.gitlab_ci? ? "true" : "false"},
current_status: "#{@merge_request.human_merge_status}", current_status: "#{@merge_request.human_merge_status_name}",
action: "#{controller.action_name}" action: "#{controller.action_name}"
}); });
}); });
......
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