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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
95ca6584
Commit
95ca6584
authored
Apr 25, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CommitRange directly to results Hash
parent
92c681a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/markdown/commit_range_reference_filter.rb
lib/gitlab/markdown/commit_range_reference_filter.rb
+1
-1
spec/lib/gitlab/reference_extractor_spec.rb
spec/lib/gitlab/reference_extractor_spec.rb
+4
-4
No files found.
lib/gitlab/markdown/commit_range_reference_filter.rb
View file @
95ca6584
...
@@ -56,7 +56,7 @@ module Gitlab
...
@@ -56,7 +56,7 @@ module Gitlab
range
=
CommitRange
.
new
(
id
,
project
)
range
=
CommitRange
.
new
(
id
,
project
)
if
range
.
valid_commits?
if
range
.
valid_commits?
push_result
(
:commit_range
,
range
.
to_a
)
push_result
(
:commit_range
,
range
)
url
=
url_for_commit_range
(
project
,
range
)
url
=
url_for_commit_range
(
project
,
range
)
...
...
spec/lib/gitlab/reference_extractor_spec.rb
View file @
95ca6584
...
@@ -65,12 +65,12 @@ describe Gitlab::ReferenceExtractor do
...
@@ -65,12 +65,12 @@ describe Gitlab::ReferenceExtractor do
earlier_commit
=
project
.
commit
(
'master~2'
)
earlier_commit
=
project
.
commit
(
'master~2'
)
subject
.
analyze
(
"this references commits
#{
earlier_commit
.
sha
[
0
..
6
]
}
...
#{
commit
.
sha
[
0
..
6
]
}
"
)
subject
.
analyze
(
"this references commits
#{
earlier_commit
.
sha
[
0
..
6
]
}
...
#{
commit
.
sha
[
0
..
6
]
}
"
)
extracted
=
subject
.
commit_ranges
extracted
=
subject
.
commit_ranges
expect
(
extracted
.
size
).
to
eq
(
1
)
expect
(
extracted
.
size
).
to
eq
(
1
)
expect
(
extracted
[
0
][
0
].
sha
).
to
eq
(
earlier_commit
.
sha
)
expect
(
extracted
.
first
).
to
be_kind_of
(
CommitRange
)
expect
(
extracted
[
0
][
0
].
message
).
to
eq
(
earlier_commit
.
message
)
expect
(
extracted
.
first
.
commit_from
).
to
eq
earlier_commit
expect
(
extracted
[
0
][
1
].
sha
).
to
eq
(
commit
.
sha
)
expect
(
extracted
.
first
.
commit_to
).
to
eq
commit
expect
(
extracted
[
0
][
1
].
message
).
to
eq
(
commit
.
message
)
end
end
context
'with a project with an underscore'
do
context
'with a project with an underscore'
do
...
...
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