summaryrefslogtreecommitdiff
path: root/app/models/external_issue.rb
diff options
context:
space:
mode:
authorBaldinof <baldinof@gmail.com>2016-03-22 10:56:44 +0100
committerBaldinof <baldinof@gmail.com>2016-03-22 15:36:50 +0100
commitb372968e936a8b02f8d7ff73a1e1cc25b332406c (patch)
tree950a01689abee7cfa68b4ce16ab794487b2e9b37 /app/models/external_issue.rb
parentfc6ee359287c6bd286e32ce808e7069714e1732e (diff)
downloadgitlab-ce-b372968e936a8b02f8d7ff73a1e1cc25b332406c.tar.gz
Add number sign on external issue reference text
Diffstat (limited to 'app/models/external_issue.rb')
-rw-r--r--app/models/external_issue.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/external_issue.rb b/app/models/external_issue.rb
index 2ca79df0a29..92f1f174941 100644
--- a/app/models/external_issue.rb
+++ b/app/models/external_issue.rb
@@ -34,7 +34,15 @@ 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}"
+ end
end