Class: Packages::PipelinesFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/packages/pipelines_finder.rb

Constant Summary collapse

COLUMNS =
%i[id iid project_id sha ref status source created_at updated_at user_id].freeze

Instance Method Summary collapse

Constructor Details

#initialize(pipeline_ids) ⇒ PipelinesFinder

Returns a new instance of PipelinesFinder.



7
8
9
# File 'app/finders/packages/pipelines_finder.rb', line 7

def initialize(pipeline_ids)
  @pipeline_ids = pipeline_ids
end

Instance Method Details

#executeObject



11
12
13
14
15
16
# File 'app/finders/packages/pipelines_finder.rb', line 11

def execute
  ::Ci::Pipeline
    .id_in(pipeline_ids)
    .select(COLUMNS)
    .order_id_desc
end