Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
361f8512
Commit
361f8512
authored
Mar 17, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename endpoints 'status' to 'pipeline_status' in merge_requests
parent
d8343a0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-2
config/routes/project.rb
config/routes/project.rb
+1
-1
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+6
-6
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
361f8512
...
...
@@ -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
)
...
...
config/routes/project.rb
View file @
361f8512
...
...
@@ -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
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
361f8512
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment