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
21 lines
383 B
Ruby
21 lines
383 B
Ruby
##
|
|
# Branch can be deleted either by DeleteBranchService
|
|
# or by GitPushService.
|
|
#
|
|
class AfterBranchDeleteService < BaseService
|
|
attr_reader :branch_name
|
|
|
|
def execute(branch_name)
|
|
@branch_name = branch_name
|
|
|
|
stop_environments
|
|
end
|
|
|
|
private
|
|
|
|
def stop_environments
|
|
Ci::StopEnvironmentsService
|
|
.new(project, current_user)
|
|
.execute(branch_name)
|
|
end
|
|
end
|