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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
commit_range_reference_filter.rb
lib/gitlab/markdown/commit_range_reference_filter.rb
+1
-1
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
range
=
CommitRange
.
new
(
id
,
project
)
if
range
.
valid_commits?
push_result
(
:commit_range
,
range
.
to_a
)
push_result
(
:commit_range
,
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
earlier_commit
=
project
.
commit
(
'master~2'
)
subject
.
analyze
(
"this references commits
#{
earlier_commit
.
sha
[
0
..
6
]
}
...
#{
commit
.
sha
[
0
..
6
]
}
"
)
extracted
=
subject
.
commit_ranges
expect
(
extracted
.
size
).
to
eq
(
1
)
expect
(
extracted
[
0
][
0
].
sha
).
to
eq
(
earlier_commit
.
sha
)
expect
(
extracted
[
0
][
0
].
message
).
to
eq
(
earlier_commit
.
message
)
expect
(
extracted
[
0
][
1
].
sha
).
to
eq
(
commit
.
sha
)
expect
(
extracted
[
0
][
1
].
message
).
to
eq
(
commit
.
message
)
expect
(
extracted
.
first
).
to
be_kind_of
(
CommitRange
)
expect
(
extracted
.
first
.
commit_from
).
to
eq
earlier_commit
expect
(
extracted
.
first
.
commit_to
).
to
eq
commit
end
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