Welcome to mirror list, hosted at ThFree Co, Russian Federation.

after_branch_delete_service.rb « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e7eb74d3e7dfba63f3cc33e89c68a0dac295a8f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

##
# 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