diff options
Diffstat (limited to 'app/models/external_issue.rb')
-rw-r--r-- | app/models/external_issue.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/app/models/external_issue.rb b/app/models/external_issue.rb index 6fda4a2ab77..49f6c95e045 100644 --- a/app/models/external_issue.rb +++ b/app/models/external_issue.rb @@ -9,10 +9,6 @@ class ExternalIssue @issue_identifier.to_s end - def to_reference(_from_project = nil) - id - end - def id @issue_identifier.to_s end @@ -32,4 +28,13 @@ class ExternalIssue def project @project end + + # Pattern used to extract `JIRA-123` issue references from text + def self.reference_pattern + %r{(?<issue>([A-Z\-]+-)\d+)} + end + + def to_reference(_from_project = nil) + id + end end |