2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Atlassian
|
|
|
|
class JiraIssueKeyExtractor
|
2023-04-23 21:23:45 +05:30
|
|
|
def self.has_keys?(...)
|
|
|
|
new(...).issue_keys.any?
|
2020-11-24 15:15:51 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def initialize(*text)
|
|
|
|
@text = text.join(' ')
|
|
|
|
end
|
|
|
|
|
|
|
|
def issue_keys
|
|
|
|
@text.scan(Gitlab::Regex.jira_issue_key_regex).uniq
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|