Make commit and MR ref filters aware of /builds path
This commit is contained in:
parent
c767d0e6bd
commit
af6b543742
|
|
@ -47,6 +47,17 @@ module Gitlab
|
||||||
def object_link_title(commit)
|
def object_link_title(commit)
|
||||||
commit.link_title
|
commit.link_title
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,14 @@ module Gitlab
|
||||||
def object_link_text_extras(object, matches)
|
def object_link_text_extras(object, matches)
|
||||||
extras = super
|
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"
|
extras.unshift "diffs"
|
||||||
|
when '/builds'
|
||||||
|
extras.unshift "builds"
|
||||||
|
when '/commits'
|
||||||
|
extras.unshift "commits"
|
||||||
end
|
end
|
||||||
|
|
||||||
extras
|
extras
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue