diff options
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 4 | ||||
-rw-r--r-- | config/routes/project.rb | 2 | ||||
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index a20334757e0..165035285f4 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -10,7 +10,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController before_action :module_enabled before_action :merge_request, only: [ :edit, :update, :show, :diffs, :commits, :conflicts, :conflict_for_path, :pipelines, :merge, :merge_check, - :ci_status, :status, :ci_environments_status, :toggle_subscription, :cancel_merge_when_pipeline_succeeds, :remove_wip, :resolve_conflicts, :assign_related_issues + :ci_status, :pipeline_status, :ci_environments_status, :toggle_subscription, :cancel_merge_when_pipeline_succeeds, :remove_wip, :resolve_conflicts, :assign_related_issues ] 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] @@ -473,7 +473,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController render json: response end - def status + def pipeline_status render json: PipelineSerializer .new(project: @project, user: @current_user) .represent_status(@merge_request.head_pipeline) diff --git a/config/routes/project.rb b/config/routes/project.rb index 1df066ff55d..823e0614aeb 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -102,7 +102,7 @@ constraints(ProjectUrlConstrainer.new) do get :merge_widget_refresh post :cancel_merge_when_pipeline_succeeds get :ci_status - get :status + get :pipeline_status get :ci_environments_status post :toggle_subscription post :remove_wip diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 8b9a26aabff..9fa509c339e 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -1179,8 +1179,8 @@ describe Projects::MergeRequestsController do end end - describe 'GET status.json' do - context 'when accessing status' do + describe 'GET pipeline_status.json' do + context 'when accessing pipeline_status' do let(:status) do Gitlab::Ci::Status::Success.new(double('object'), double('user')) end @@ -1190,10 +1190,10 @@ describe Projects::MergeRequestsController do ref: merge_request.source_branch, sha: merge_request.diff_head_sha, status: :success) - get :status, namespace_id: project.namespace, - project_id: project, - id: merge_request.iid, - format: :json + get :pipeline_status, namespace_id: project.namespace, + project_id: project, + id: merge_request.iid, + format: :json end it 'return a correct pipeline status' do |