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
Boxiang Sun
gitlab-ce
Commits
af6b5437
Commit
af6b5437
authored
Dec 08, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make commit and MR ref filters aware of /builds path
parent
c767d0e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
lib/gitlab/markdown/commit_reference_filter.rb
lib/gitlab/markdown/commit_reference_filter.rb
+11
-0
lib/gitlab/markdown/merge_request_reference_filter.rb
lib/gitlab/markdown/merge_request_reference_filter.rb
+7
-1
No files found.
lib/gitlab/markdown/commit_reference_filter.rb
View file @
af6b5437
...
@@ -47,6 +47,17 @@ module Gitlab
...
@@ -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
lib/gitlab/markdown/merge_request_reference_filter.rb
View file @
af6b5437
...
@@ -24,8 +24,14 @@ module Gitlab
...
@@ -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
...
...
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