Commit c5536fd9 authored by Yorick Peterse's avatar Yorick Peterse

Refactor Ci::Pipeline's config_sources enum

This enum is now defined in the Ci::PipelineEnums module, allowing EE to
extend this enum without having to modify Ci::Pipeline directly.
parent 81ddb692
......@@ -68,11 +68,7 @@ module Ci
# this `Hash` with new values.
enum_with_nil source: ::Ci::PipelineEnums.sources
enum_with_nil config_source: {
unknown_source: nil,
repository_source: 1,
auto_devops_source: 2
}
enum_with_nil config_source: ::Ci::PipelineEnums.config_sources
# We use `Ci::PipelineEnums.failure_reasons` here so that EE can more easily
# extend this `Hash` with new values.
......
......@@ -25,5 +25,15 @@ module Ci
merge_request: 10
}
end
# Returns the `Hash` to use for creating the `config_sources` enum for
# `Ci::Pipeline`.
def self.config_sources
{
unknown_source: nil,
repository_source: 1,
auto_devops_source: 2
}
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