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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fc6fa9cb
Commit
fc6fa9cb
authored
Aug 10, 2021
by
Balasankar "Balu" C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include pipeline source in Pipelines API response
Signed-off-by:
Balasankar "Balu" C
<
balasankar@gitlab.com
>
parent
7907e757
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
lib/api/entities/ci/pipeline_basic.rb
lib/api/entities/ci/pipeline_basic.rb
+1
-1
spec/fixtures/api/schemas/pipeline_schedule.json
spec/fixtures/api/schemas/pipeline_schedule.json
+1
-0
spec/requests/api/ci/pipelines_spec.rb
spec/requests/api/ci/pipelines_spec.rb
+1
-1
No files found.
lib/api/entities/ci/pipeline_basic.rb
View file @
fc6fa9cb
...
@@ -4,7 +4,7 @@ module API
...
@@ -4,7 +4,7 @@ module API
module
Entities
module
Entities
module
Ci
module
Ci
class
PipelineBasic
<
Grape
::
Entity
class
PipelineBasic
<
Grape
::
Entity
expose
:id
,
:project_id
,
:sha
,
:ref
,
:status
expose
:id
,
:project_id
,
:sha
,
:ref
,
:status
,
:source
expose
:created_at
,
:updated_at
expose
:created_at
,
:updated_at
expose
:web_url
do
|
pipeline
,
_options
|
expose
:web_url
do
|
pipeline
,
_options
|
...
...
spec/fixtures/api/schemas/pipeline_schedule.json
View file @
fc6fa9cb
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
"sha"
:
{
"type"
:
"string"
},
"sha"
:
{
"type"
:
"string"
},
"ref"
:
{
"type"
:
"string"
},
"ref"
:
{
"type"
:
"string"
},
"status"
:
{
"type"
:
"string"
},
"status"
:
{
"type"
:
"string"
},
"source"
:
{
"type"
:
"string"
},
"web_url"
:
{
"type"
:
[
"string"
,
"null"
]
},
"web_url"
:
{
"type"
:
[
"string"
,
"null"
]
},
"created_at"
:
{
"type"
:
[
"string"
,
"null"
],
"format"
:
"date-time"
},
"created_at"
:
{
"type"
:
[
"string"
,
"null"
],
"format"
:
"date-time"
},
"updated_at"
:
{
"type"
:
[
"string"
,
"null"
],
"format"
:
"date-time"
}
"updated_at"
:
{
"type"
:
[
"string"
,
"null"
],
"format"
:
"date-time"
}
...
...
spec/requests/api/ci/pipelines_spec.rb
View file @
fc6fa9cb
...
@@ -34,7 +34,7 @@ RSpec.describe API::Ci::Pipelines do
...
@@ -34,7 +34,7 @@ RSpec.describe API::Ci::Pipelines do
expect
(
json_response
.
first
[
'sha'
]).
to
match
(
/\A\h{40}\z/
)
expect
(
json_response
.
first
[
'sha'
]).
to
match
(
/\A\h{40}\z/
)
expect
(
json_response
.
first
[
'id'
]).
to
eq
pipeline
.
id
expect
(
json_response
.
first
[
'id'
]).
to
eq
pipeline
.
id
expect
(
json_response
.
first
[
'web_url'
]).
to
be_present
expect
(
json_response
.
first
[
'web_url'
]).
to
be_present
expect
(
json_response
.
first
.
keys
).
to
contain_exactly
(
*
%w[id project_id sha ref status web_url created_at updated_at]
)
expect
(
json_response
.
first
.
keys
).
to
contain_exactly
(
*
%w[id project_id sha ref status web_url created_at updated_at
source
]
)
end
end
context
'when parameter is passed'
do
context
'when parameter is passed'
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