debian-mirror-gitlab/lib/bulk_imports/projects/pipelines/releases_pipeline.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
695 B
Ruby
Raw Normal View History

2022-07-16 23:28:13 +05:30
# frozen_string_literal: true
module BulkImports
module Projects
module Pipelines
class ReleasesPipeline
include NdjsonPipeline
relation_name 'releases'
extractor ::BulkImports::Common::Extractors::NdjsonExtractor, relation: relation
2022-07-23 23:45:48 +05:30
def after_run(_context)
super
portable.releases.find_each do |release|
create_release_evidence(release)
end
end
private
def create_release_evidence(release)
return if release.historical_release? || release.upcoming_release?
::Releases::CreateEvidenceWorker.perform_async(release.id)
end
2022-07-16 23:28:13 +05:30
end
end
end
end