gitlab-org--gitlab-foss/app/services/after_branch_delete_service.rb
Semyon Pupkov 724864eeb4 Remove unnecessary require_relative calls from service classes
Rails by default use autoload for all dirs from app folder.
require_relative not needed. See ActiveSupport::Dependencies.autoload_paths
2016-11-22 11:25:00 +05:00

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