Commit bfb09b56 authored by Vijay Hawoldar's avatar Vijay Hawoldar

Refactor Ci::PipelineEnums for readability

parent 28c8bd3f
...@@ -905,8 +905,7 @@ module Ci ...@@ -905,8 +905,7 @@ module Ci
end end
def cacheable? def cacheable?
source_enum = Ci::PipelineEnums.config_sources[config_source.to_sym] Ci::PipelineEnums.ci_config_sources.key?(config_source.to_sym)
Ci::PipelineEnums.ci_config_sources_values.include?(source_enum)
end end
private private
......
...@@ -46,13 +46,18 @@ module Ci ...@@ -46,13 +46,18 @@ module Ci
} }
end end
def self.ci_config_sources_values def self.ci_config_sources
config_sources.values_at( config_sources.slice(
:unknown_source, :unknown_source,
:repository_source, :repository_source,
:auto_devops_source, :auto_devops_source,
:remote_source, :remote_source,
:external_project_source) :external_project_source
)
end
def self.ci_config_sources_values
ci_config_sources.values
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment