56de781a2c
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9. # Conflicts: # .rubocop.yml # .rubocop_todo.yml # lib/gitlab/ci/config/entry/global.rb # lib/gitlab/ci/config/entry/jobs.rb # spec/lib/gitlab/ci/config/entry/factory_spec.rb # spec/lib/gitlab/ci/config/entry/global_spec.rb # spec/lib/gitlab/ci/config/entry/job_spec.rb # spec/lib/gitlab/ci/status/build/factory_spec.rb # spec/lib/gitlab/incoming_email_spec.rb
12 lines
301 B
Ruby
12 lines
301 B
Ruby
class PipelineSuccessWorker
|
|
include Sidekiq::Worker
|
|
include PipelineQueue
|
|
|
|
def perform(pipeline_id)
|
|
Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline|
|
|
MergeRequests::MergeWhenPipelineSucceedsService
|
|
.new(pipeline.project, nil)
|
|
.trigger(pipeline)
|
|
end
|
|
end
|
|
end
|