Commit bfb09b56 authored by Vijay Hawoldar's avatar Vijay Hawoldar

Refactor Ci::PipelineEnums for readability

parent 28c8bd3f
......@@ -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
......
......@@ -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
......
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