diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/models/deployment.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r-- | app/models/deployment.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb index b93b714ec8b..6f40466394a 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -109,6 +109,23 @@ class Deployment < ApplicationRecord Deployments::ExecuteHooksWorker.perform_async(id) end end + + after_transition any => any - [:skipped] do |deployment, transition| + next if transition.loopback? + next unless Feature.enabled?(:jira_sync_deployments, deployment.project) + + deployment.run_after_commit do + ::JiraConnect::SyncDeploymentsWorker.perform_async(id) + end + end + end + + after_create unless: :importing? do |deployment| + next unless Feature.enabled?(:jira_sync_deployments, deployment.project) + + run_after_commit do + ::JiraConnect::SyncDeploymentsWorker.perform_async(deployment.id) + end end enum status: { |