summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-07-25 17:29:51 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-07-25 17:29:51 +0800
commitd19717cba65ef3ae6f76ec25140ab5c255b27d42 (patch)
treecd6573c77af34ba085275d95732e7b4a072507fa /lib
parentba997f3c428d94adfc9a2eb4eb0daaa3d759c4df (diff)
downloadgitlab-ce-d19717cba65ef3ae6f76ec25140ab5c255b27d42.tar.gz
Backport Jira issue key regex
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/regex.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index e43147a3f37..21614ea003e 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -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