Merge branch '9643-jira-api-serializer-ce' into 'master'
[CE] Create serializer for Jira API JSON payload See merge request gitlab-org/gitlab-ce!31139
This commit is contained in:
commit
2dd33c0812
2 changed files with 7 additions and 1 deletions
|
@ -31,7 +31,7 @@ class JiraService < IssueTrackerService
|
|||
|
||||
# {PROJECT-KEY}-{NUMBER} Examples: JIRA-1, PROJECT-1
|
||||
def self.reference_pattern(only_long: true)
|
||||
@reference_pattern ||= /(?<issue>\b([A-Z][A-Z0-9_]+-)\d+)/
|
||||
@reference_pattern ||= /(?<issue>\b#{Gitlab::Regex.jira_issue_key_regex})/
|
||||
end
|
||||
|
||||
def initialize_properties
|
||||
|
|
|
@ -94,6 +94,12 @@ module Gitlab
|
|||
}mx
|
||||
end
|
||||
|
||||
# Based on Jira's project key format
|
||||
# https://confluence.atlassian.com/adminjiraserver073/changing-the-project-key-format-861253229.html
|
||||
def jira_issue_key_regex
|
||||
@jira_issue_key_regex ||= /[A-Z][A-Z_0-9]+-\d+/
|
||||
end
|
||||
|
||||
def jira_transition_id_regex
|
||||
@jira_transition_id_regex ||= /\d+/
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue