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
bfb09b56
Commit
bfb09b56
authored
Feb 12, 2020
by
Vijay Hawoldar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Ci::PipelineEnums for readability
parent
28c8bd3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-2
app/models/ci/pipeline_enums.rb
app/models/ci/pipeline_enums.rb
+8
-3
No files found.
app/models/ci/pipeline.rb
View file @
bfb09b56
...
...
@@ -905,8 +905,7 @@ module Ci
end
def
cacheable?
source_enum
=
Ci
::
PipelineEnums
.
config_sources
[
config_source
.
to_sym
]
Ci
::
PipelineEnums
.
ci_config_sources_values
.
include?
(
source_enum
)
Ci
::
PipelineEnums
.
ci_config_sources
.
key?
(
config_source
.
to_sym
)
end
private
...
...
app/models/ci/pipeline_enums.rb
View file @
bfb09b56
...
...
@@ -46,13 +46,18 @@ module Ci
}
end
def
self
.
ci_config_sources
_values
config_sources
.
values_at
(
def
self
.
ci_config_sources
config_sources
.
slice
(
:unknown_source
,
:repository_source
,
:auto_devops_source
,
:remote_source
,
:external_project_source
)
:external_project_source
)
end
def
self
.
ci_config_sources_values
ci_config_sources
.
values
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