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
8a13ab76
Commit
8a13ab76
authored
May 25, 2020
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose locked? in BuildDetailsEntity
parent
22262be8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/serializers/build_details_entity.rb
app/serializers/build_details_entity.rb
+4
-0
spec/fixtures/api/schemas/job/artifact.json
spec/fixtures/api/schemas/job/artifact.json
+2
-1
spec/serializers/build_details_entity_spec.rb
spec/serializers/build_details_entity_spec.rb
+1
-1
No files found.
app/serializers/build_details_entity.rb
View file @
8a13ab76
...
...
@@ -46,6 +46,10 @@ class BuildDetailsEntity < JobEntity
expose
:expired
,
if:
->
(
*
)
{
build
.
artifacts_expire_at
.
present?
}
do
|
build
|
build
.
artifacts_expired?
end
expose
:locked
,
if:
->
(
*
)
{
build
.
job_artifacts_archive
.
present?
}
do
|
build
|
build
.
job_artifacts_archive
.
locked?
end
end
expose
:report_artifacts
,
...
...
spec/fixtures/api/schemas/job/artifact.json
View file @
8a13ab76
...
...
@@ -5,7 +5,8 @@
"browse_path"
:
{
"type"
:
"string"
},
"keep_path"
:
{
"type"
:
"string"
},
"expired"
:
{
"type"
:
"boolean"
},
"expire_at"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
}
"expire_at"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
},
"locked"
:
{
"type"
:
"boolean"
}
},
"additionalProperties"
:
false
}
spec/serializers/build_details_entity_spec.rb
View file @
8a13ab76
...
...
@@ -190,7 +190,7 @@ describe BuildDetailsEntity do
let!
(
:report
)
{
create
(
:ci_job_artifact
,
:codequality
,
job:
build
)
}
it
'exposes artifact details'
do
expect
(
subject
[
:artifact
].
keys
).
to
include
(
:download_path
,
:browse_path
,
:keep_path
,
:expire_at
,
:expired
)
expect
(
subject
[
:artifact
].
keys
).
to
include
(
:download_path
,
:browse_path
,
:keep_path
,
:expire_at
,
:expired
,
:locked
)
end
end
end
...
...
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