BigW Consortium Gitlab

pipeline_success_worker.rb 301 Bytes
Newer Older
1 2
class PipelineSuccessWorker
  include Sidekiq::Worker
3
  include PipelineQueue
4 5 6

  def perform(pipeline_id)
    Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline|
7
      MergeRequests::MergeWhenPipelineSucceedsService
8 9 10 11 12
        .new(pipeline.project, nil)
        .trigger(pipeline)
    end
  end
end