BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2d2f413a
Commit
2d2f413a
authored
Nov 10, 2016
by
Regis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'auto-pipelines-vue' of gitlab.com:gitlab-org/gitlab-ce into auto-pipelines-vue
parents
0c835170
ba2d1fde
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
pipeline_entity.rb
app/serializers/pipeline_entity.rb
+8
-19
No files found.
app/serializers/pipeline_entity.rb
View file @
2d2f413a
...
...
@@ -3,6 +3,12 @@ class PipelineEntity < Grape::Entity
expose
:id
expose
:user
,
if:
->
(
pipeline
,
opts
)
{
created?
(
pipeline
,
opts
)
},
using:
UserEntity
expose
:url
do
|
pipeline
|
namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
)
end
expose
:details
,
if:
->
(
pipeline
,
opts
)
{
updated?
(
pipeline
,
opts
)
}
do
expose
:status
...
...
@@ -29,7 +35,7 @@ class PipelineEntity < Grape::Entity
pipeline
.
ref
end
expose
:
ref_
url
do
|
pipeline
|
expose
:url
do
|
pipeline
|
namespace_project_tree_url
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
...
...
@@ -39,24 +45,7 @@ class PipelineEntity < Grape::Entity
expose
:tag?
end
expose
:commit
,
if:
->
(
pipeline
,
opts
)
{
created?
(
pipeline
,
opts
)
}
do
expose
:short_sha
expose
:sha_url
do
|
pipeline
|
namespace_project_commit_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
sha
)
end
expose
:title
do
|
pipeline
|
pipeline
.
commit
.
try
(
:title
)
end
expose
:author
,
using:
UserEntity
do
|
pipeline
|
pipeline
.
commit
.
try
(
:author
)
end
end
expose
:commit
,
if:
->
(
pipeline
,
opts
)
{
created?
(
pipeline
,
opts
)
},
using:
CommitEntity
expose
:retry_url
,
if:
->
(
pipeline
,
opts
)
{
updated?
(
pipeline
,
opts
)
}
do
|
pipeline
|
can?
(
current_user
,
:update_pipeline
,
pipeline
.
project
)
&&
...
...
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