diff options
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index cf23cd3be67..b34d64de101 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class CommitStatus < ApplicationRecord +class CommitStatus < Ci::ApplicationRecord include Ci::HasStatus include Importable include AfterCommitQueue @@ -58,6 +58,7 @@ class CommitStatus < ApplicationRecord scope :in_pipelines, ->(pipelines) { where(pipeline: pipelines) } scope :eager_load_pipeline, -> { eager_load(:pipeline, project: { namespace: :route }) } scope :with_pipeline, -> { joins(:pipeline) } + scope :updated_at_before, ->(date) { where('updated_at < ?', date) } scope :updated_before, ->(lookback:, timeout:) { where('(ci_builds.created_at BETWEEN ? AND ?) AND (ci_builds.updated_at BETWEEN ? AND ?)', lookback, timeout, lookback, timeout) } |