Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
873127d6
Commit
873127d6
authored
Jun 13, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return JiraIssues in ReferenceExtractor#issues_for
parent
d4ae3e4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
lib/gitlab/reference_extractor.rb
lib/gitlab/reference_extractor.rb
+3
-1
spec/lib/gitlab/reference_extractor_spec.rb
spec/lib/gitlab/reference_extractor_spec.rb
+9
-0
No files found.
lib/gitlab/reference_extractor.rb
View file @
873127d6
...
...
@@ -24,7 +24,9 @@ module Gitlab
def
issues_for
project
if
project
.
jira_tracker?
issues
.
uniq
issues
.
uniq
.
map
do
|
jira_identifier
|
JiraIssue
.
new
(
jira_identifier
)
end
else
issues
.
map
do
|
identifier
|
project
.
issues
.
where
(
iid:
identifier
).
first
...
...
spec/lib/gitlab/reference_extractor_spec.rb
View file @
873127d6
...
...
@@ -71,6 +71,15 @@ describe Gitlab::ReferenceExtractor do
subject
.
issues_for
(
project
).
should
==
[
@i0
,
@i1
]
end
it
'returns JIRA issues for a JIRA-integrated project'
do
project
.
stub
(
jira_tracker?:
true
)
subject
.
analyze
(
'JIRA-123 and FOOBAR-4567'
)
subject
.
issues_for
(
project
).
should
eq
(
[
JiraIssue
.
new
(
'JIRA-123'
),
JiraIssue
.
new
(
'FOOBAR-4567'
)]
)
end
it
'accesses valid merge requests'
do
@m0
=
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
source_branch:
'aaa'
)
@m1
=
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
source_branch:
'bbb'
)
...
...
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