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
e77721cb
Commit
e77721cb
authored
Apr 07, 2021
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use fast path helpers in BuildDetailsEntity
parent
d7dc9398
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
app/serializers/build_details_entity.rb
app/serializers/build_details_entity.rb
+3
-3
changelogs/unreleased/dc-use-fast-path-helpers.yml
changelogs/unreleased/dc-use-fast-path-helpers.yml
+5
-0
No files found.
app/serializers/build_details_entity.rb
View file @
e77721cb
...
...
@@ -28,15 +28,15 @@ class BuildDetailsEntity < JobEntity
expose
:artifact
,
if:
->
(
*
)
{
can?
(
current_user
,
:read_job_artifacts
,
build
)
}
do
expose
:download_path
,
if:
->
(
*
)
{
build
.
locked_artifacts?
||
build
.
artifacts?
}
do
|
build
|
download_project_job_artifacts_path
(
project
,
build
)
fast_
download_project_job_artifacts_path
(
project
,
build
)
end
expose
:browse_path
,
if:
->
(
*
)
{
build
.
locked_artifacts?
||
build
.
browsable_artifacts?
}
do
|
build
|
browse_project_job_artifacts_path
(
project
,
build
)
fast_
browse_project_job_artifacts_path
(
project
,
build
)
end
expose
:keep_path
,
if:
->
(
*
)
{
(
build
.
has_expired_locked_archive_artifacts?
||
build
.
has_expiring_archive_artifacts?
)
&&
can?
(
current_user
,
:update_build
,
build
)
}
do
|
build
|
keep_project_job_artifacts_path
(
project
,
build
)
fast_
keep_project_job_artifacts_path
(
project
,
build
)
end
expose
:expire_at
,
if:
->
(
*
)
{
build
.
artifacts_expire_at
.
present?
}
do
|
build
|
...
...
changelogs/unreleased/dc-use-fast-path-helpers.yml
0 → 100644
View file @
e77721cb
---
title
:
Use fast path helpers in BuildDetailsEntity
merge_request
:
58824
author
:
type
:
performance
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