Commit 361f8512 authored by Shinya Maeda's avatar Shinya Maeda

Rename endpoints 'status' to 'pipeline_status' in merge_requests

parent d8343a0c
......@@ -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)
......
......@@ -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
......
......@@ -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,7 +1190,7 @@ describe Projects::MergeRequestsController do
ref: merge_request.source_branch,
sha: merge_request.diff_head_sha,
status: :success)
get :status, namespace_id: project.namespace,
get :pipeline_status, namespace_id: project.namespace,
project_id: project,
id: merge_request.iid,
format: :json
......
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