Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d19717cb
Commit
d19717cb
authored
Jul 25, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport Jira issue key regex
parent
ba997f3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+1
-1
lib/gitlab/regex.rb
lib/gitlab/regex.rb
+6
-0
No files found.
app/models/project_services/jira_service.rb
View file @
d19717cb
...
...
@@ -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
...
...
lib/gitlab/regex.rb
View file @
d19717cb
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment