Commit 5ec3129ea657dc1c28c45ed4f54ec62fc6050ce6
Committed by
Pedro Guridi
1 parent
9351a295
Exists in
master
and in
4 other branches
Changed regex to support Jira issue numbering format
Jira issues numbering format are like: "PROJECT-1234". Changed the regular expression to support Jira issues linking, in addition to the normal #123. Added Jira Issue tracker configuration example
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
config/gitlab.yml.example
... | ... | @@ -70,6 +70,11 @@ production: &base |
70 | 70 | # ## :project_id - GitLab project identifier |
71 | 71 | # ## :issues_tracker_id - Project Name or Id in external issue tracker |
72 | 72 | # new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new" |
73 | + # | |
74 | + # jira: | |
75 | + # project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id" | |
76 | + # issues_url: "http://jira.sample/browse/:id" | |
77 | + # new_issue_url: "http://jira.sample/secure/CreateIssue.jspa" | |
73 | 78 | |
74 | 79 | ## Gravatar |
75 | 80 | gravatar: | ... | ... |
lib/gitlab/markdown.rb
... | ... | @@ -7,6 +7,7 @@ module Gitlab |
7 | 7 | # Supported reference formats are: |
8 | 8 | # * @foo for team members |
9 | 9 | # * #123 for issues |
10 | + # * #JIRA-123 for Jira issues | |
10 | 11 | # * !123 for merge requests |
11 | 12 | # * $123 for snippets |
12 | 13 | # * 123456 for commits |
... | ... | @@ -97,7 +98,7 @@ module Gitlab |
97 | 98 | (?<prefix>\W)? # Prefix |
98 | 99 | ( # Reference |
99 | 100 | @(?<user>[a-zA-Z][a-zA-Z0-9_\-\.]*) # User name |
100 | - |\#(?<issue>\d+) # Issue ID | |
101 | + |\#(?<issue>([a-zA-Z]+-)?\d+) # Issue ID | |
101 | 102 | |!(?<merge_request>\d+) # MR ID |
102 | 103 | |\$(?<snippet>\d+) # Snippet ID |
103 | 104 | |(?<commit>[\h]{6,40}) # Commit ID | ... | ... |