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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ff0c1d9b
Commit
ff0c1d9b
authored
May 04, 2021
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect MR popovers
Fixes a bug where cross-project MR references were showing incorrect popovers
parent
7fa6147d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
lib/banzai/filter/references/merge_request_reference_filter.rb
...anzai/filter/references/merge_request_reference_filter.rb
+1
-1
lib/gitlab/markdown_cache.rb
lib/gitlab/markdown_cache.rb
+1
-1
spec/lib/banzai/filter/references/merge_request_reference_filter_spec.rb
.../filter/references/merge_request_reference_filter_spec.rb
+11
-0
No files found.
lib/banzai/filter/references/merge_request_reference_filter.rb
View file @
ff0c1d9b
...
...
@@ -58,7 +58,7 @@ module Banzai
end
def
data_attributes_for
(
text
,
parent
,
object
,
**
data
)
super
.
merge
(
project_path:
current_parent
_path
,
iid:
object
.
iid
,
mr_title:
object
.
title
)
super
.
merge
(
project_path:
parent
.
full
_path
,
iid:
object
.
iid
,
mr_title:
object
.
title
)
end
private
...
...
lib/gitlab/markdown_cache.rb
View file @
ff0c1d9b
...
...
@@ -3,7 +3,7 @@
module
Gitlab
module
MarkdownCache
# Increment this number every time the renderer changes its output
CACHE_COMMONMARK_VERSION
=
2
7
CACHE_COMMONMARK_VERSION
=
2
8
CACHE_COMMONMARK_VERSION_START
=
10
BaseError
=
Class
.
new
(
StandardError
)
...
...
spec/lib/banzai/filter/references/merge_request_reference_filter_spec.rb
View file @
ff0c1d9b
...
...
@@ -142,6 +142,17 @@ RSpec.describe Banzai::Filter::References::MergeRequestReferenceFilter do
expect
(
doc
.
text
).
to
eq
(
"Merge (
#{
reference
}
.)"
)
end
it
'has correct data attributes'
do
doc
=
reference_filter
(
"Merge (
#{
reference
}
.)"
)
link
=
doc
.
css
(
'a'
).
first
expect
(
link
.
attr
(
'data-project'
)).
to
eq
project2
.
id
.
to_s
expect
(
link
.
attr
(
'data-project-path'
)).
to
eq
project2
.
full_path
expect
(
link
.
attr
(
'data-iid'
)).
to
eq
merge
.
iid
.
to_s
expect
(
link
.
attr
(
'data-mr-title'
)).
to
eq
merge
.
title
end
it
'ignores invalid merge IDs on the referenced project'
do
exp
=
act
=
"Merge
#{
invalidate_reference
(
reference
)
}
"
...
...
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