Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
356956790bc2
Commit
af6b5437
authored
Dec 08, 2015
by
Douwe Maan
Browse files
Make commit and MR ref filters aware of /builds path
parent
ecb9e723d072
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/gitlab/markdown/commit_reference_filter.rb
View file @
35695679
...
...
@@ -47,6 +47,17 @@ def url_for_object(commit, project)
def
object_link_title
(
commit
)
commit
.
link_title
end
def
object_link_text_extras
(
object
,
matches
)
extras
=
super
path
=
matches
[
:path
]
if
matches
.
names
.
include?
(
"path"
)
if
path
==
'/builds'
extras
.
unshift
"builds"
end
extras
end
end
end
end
lib/gitlab/markdown/merge_request_reference_filter.rb
View file @
35695679
...
...
@@ -24,8 +24,14 @@ def url_for_object(mr, project)
def
object_link_text_extras
(
object
,
matches
)
extras
=
super
if
matches
.
names
.
include?
(
"path"
)
&&
matches
[
:path
]
&&
matches
[
:path
]
==
'/diffs'
path
=
matches
[
:path
]
if
matches
.
names
.
include?
(
"path"
)
case
path
when
'/diffs'
extras
.
unshift
"diffs"
when
'/builds'
extras
.
unshift
"builds"
when
'/commits'
extras
.
unshift
"commits"
end
extras
...
...
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