diff options
Diffstat (limited to 'lib/atlassian/jira_connect/serializers/build_entity.rb')
-rw-r--r-- | lib/atlassian/jira_connect/serializers/build_entity.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/atlassian/jira_connect/serializers/build_entity.rb b/lib/atlassian/jira_connect/serializers/build_entity.rb index 3eb8b1f1978..8372d2a62da 100644 --- a/lib/atlassian/jira_connect/serializers/build_entity.rb +++ b/lib/atlassian/jira_connect/serializers/build_entity.rb @@ -25,8 +25,10 @@ module Atlassian # extract Jira issue keys from either the source branch/ref or the # merge request title. @issue_keys ||= begin - src = "#{pipeline.source_ref} #{pipeline.merge_request&.title}" - JiraIssueKeyExtractor.new(src).issue_keys + pipeline.all_merge_requests.flat_map do |mr| + src = "#{mr.source_branch} #{mr.title}" + JiraIssueKeyExtractor.new(src).issue_keys + end.uniq end end |