Commit 9f8e64e6 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'refactor-ci-pipeline-config-source-enum' into 'master'

Refactor Ci::Pipeline's config_sources enum

Closes gitlab-ee#8244

See merge request gitlab-org/gitlab-ce!23799
parents 4ee1eb38 c5536fd9
...@@ -68,11 +68,7 @@ module Ci ...@@ -68,11 +68,7 @@ module Ci
# this `Hash` with new values. # this `Hash` with new values.
enum_with_nil source: ::Ci::PipelineEnums.sources enum_with_nil source: ::Ci::PipelineEnums.sources
enum_with_nil config_source: { enum_with_nil config_source: ::Ci::PipelineEnums.config_sources
unknown_source: nil,
repository_source: 1,
auto_devops_source: 2
}
# We use `Ci::PipelineEnums.failure_reasons` here so that EE can more easily # We use `Ci::PipelineEnums.failure_reasons` here so that EE can more easily
# extend this `Hash` with new values. # extend this `Hash` with new values.
......
...@@ -25,5 +25,15 @@ module Ci ...@@ -25,5 +25,15 @@ module Ci
merge_request: 10 merge_request: 10
} }
end 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
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