diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-14 09:08:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-14 09:08:29 +0300 |
commit | 89528516610699b580e6ea925312f08a9fdb44ce (patch) | |
tree | 12023083c1d1e685e5dc02d05c12f55753ab6fd2 /app/services/environments | |
parent | 7046de6ada59c5b9602a9be71e1976fc1adaea58 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/environments')
-rw-r--r-- | app/services/environments/stop_service.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/environments/stop_service.rb b/app/services/environments/stop_service.rb index 8e66155f400..24ae658d3d6 100644 --- a/app/services/environments/stop_service.rb +++ b/app/services/environments/stop_service.rb @@ -7,7 +7,7 @@ module Environments def execute(environment) return unless can?(current_user, :stop_environment, environment) - environment.stop_with_action!(current_user) + environment.stop_with_actions!(current_user) end def execute_for_branch(branch_name) @@ -19,7 +19,9 @@ module Environments end def execute_for_merge_request(merge_request) - merge_request.environments_in_head_pipeline.each { |environment| execute(environment) } + merge_request.environments_in_head_pipeline(deployment_status: :success).each do |environment| + execute(environment) + end end private |