diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-05 12:19:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-05 12:19:15 +0300 |
commit | 508f0c4ee719abb1294684eea4a63aa44cd23597 (patch) | |
tree | 1af8199669fe0e9086bc57ba91510e80da093ffa /app/workers | |
parent | 9a0dd27b634dde1f947beafcf822efef1cd2dcfc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/jira_connect/sync_merge_request_worker.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/workers/jira_connect/sync_merge_request_worker.rb b/app/workers/jira_connect/sync_merge_request_worker.rb index 6576aa9fdf4..76f62e55ab1 100644 --- a/app/workers/jira_connect/sync_merge_request_worker.rb +++ b/app/workers/jira_connect/sync_merge_request_worker.rb @@ -14,10 +14,13 @@ module JiraConnect def perform(merge_request_id, update_sequence_id) merge_request = MergeRequest.find_by_id(merge_request_id) + project = merge_request&.project - return unless merge_request && merge_request.project + return unless merge_request && project - JiraConnect::SyncService.new(merge_request.project).execute(merge_requests: [merge_request], update_sequence_id: update_sequence_id) + branches = [project.repository.find_branch(merge_request.source_branch)].compact + + JiraConnect::SyncService.new(project).execute(merge_requests: [merge_request], branches: branches, update_sequence_id: update_sequence_id) end end end |