diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-02 21:10:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-02 21:10:05 +0300 |
commit | 983f6954d19f269a059aab1754568737d9ab6f64 (patch) | |
tree | 399b8b75abf57118df941af3b485b85a0fb60540 /app/models/commit_status.rb | |
parent | e36443c1d657343410d3de25d52ae0fe9ee67d8d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 0a62efc6131..2470eada62e 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -21,7 +21,12 @@ class CommitStatus < Ci::ApplicationRecord has_many :needs, class_name: 'Ci::BuildNeed', foreign_key: :build_id, inverse_of: :build + attribute :retried, default: false + enum scheduling_type: { stage: 0, dag: 1 }, _prefix: true + # We use `Enums::Ci::CommitStatus.failure_reasons` here so that EE can more easily + # extend this `Hash` with new values. + enum_with_nil failure_reason: Enums::Ci::CommitStatus.failure_reasons delegate :commit, to: :pipeline delegate :sha, :short_sha, :before_sha, to: :pipeline @@ -96,12 +101,6 @@ class CommitStatus < Ci::ApplicationRecord merge(or_conditions) end - # We use `Enums::Ci::CommitStatus.failure_reasons` here so that EE can more easily - # extend this `Hash` with new values. - enum_with_nil failure_reason: Enums::Ci::CommitStatus.failure_reasons - - default_value_for :retried, false - ## # We still create some CommitStatuses outside of CreatePipelineService. # |