diff options
author | Baldinof <baldinof@gmail.com> | 2016-04-12 10:01:52 +0200 |
---|---|---|
committer | Baldinof <baldinof@gmail.com> | 2016-04-12 10:01:52 +0200 |
commit | 3918fce5bd073e18addb7d1d4aaf3c81ce8150b0 (patch) | |
tree | 9c4ce48085f9afce77f623547682a6715741f3f5 /app/models/external_issue.rb | |
parent | b372968e936a8b02f8d7ff73a1e1cc25b332406c (diff) | |
download | gitlab-ce-3918fce5bd073e18addb7d1d4aaf3c81ce8150b0.tar.gz |
Hide number sign for string prefixed external issues
Diffstat (limited to 'app/models/external_issue.rb')
-rw-r--r-- | app/models/external_issue.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/external_issue.rb b/app/models/external_issue.rb index 92f1f174941..d47b479faa8 100644 --- a/app/models/external_issue.rb +++ b/app/models/external_issue.rb @@ -34,15 +34,13 @@ class ExternalIssue %r{(?<issue>\b([A-Z][A-Z0-9_]+-)\d+)} end - def self.reference_prefix - '#' - end - def to_reference(_from_project = nil) id end def reference_link_text(from_project = nil) - "#{self.class.reference_prefix}#{id}" + return "##{id}" if /^\d+$/.match(id) + + id end end |