BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b372968e
Commit
b372968e
authored
Mar 22, 2016
by
Baldinof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add number sign on external issue reference text
parent
fc6ee359
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
external_issue.rb
app/models/external_issue.rb
+8
-0
external_issue_spec.rb
spec/models/external_issue_spec.rb
+6
-0
No files found.
app/models/external_issue.rb
View file @
b372968e
...
...
@@ -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
spec/models/external_issue_spec.rb
View file @
b372968e
...
...
@@ -36,4 +36,10 @@ describe ExternalIssue, models: true do
expect
(
issue
.
title
).
to
eq
"External Issue
#{
issue
}
"
end
end
describe
'#reference_link_text'
do
it
'returns a String reference to the object'
do
expect
(
issue
.
reference_link_text
).
to
eq
'#EXT-1234'
end
end
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