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
7ecc247a
Commit
7ecc247a
authored
Apr 13, 2021
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust class names to new references dir
for reference filters
parent
dceae94f
Changes
49
Show whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
1634 additions
and
1586 deletions
+1634
-1586
ee/lib/ee/banzai/filter/references/abstract_reference_filter.rb
.../ee/banzai/filter/references/abstract_reference_filter.rb
+7
-5
ee/lib/ee/banzai/filter/references/epic_reference_filter.rb
ee/lib/ee/banzai/filter/references/epic_reference_filter.rb
+38
-36
ee/lib/ee/banzai/filter/references/iteration_reference_filter.rb
...ee/banzai/filter/references/iteration_reference_filter.rb
+82
-80
ee/lib/ee/banzai/filter/references/label_reference_filter.rb
ee/lib/ee/banzai/filter/references/label_reference_filter.rb
+16
-14
ee/lib/ee/banzai/filter/references/vulnerability_reference_filter.rb
...anzai/filter/references/vulnerability_reference_filter.rb
+44
-42
ee/lib/ee/banzai/pipeline/gfm_pipeline.rb
ee/lib/ee/banzai/pipeline/gfm_pipeline.rb
+3
-3
ee/lib/ee/banzai/pipeline/single_line_pipeline.rb
ee/lib/ee/banzai/pipeline/single_line_pipeline.rb
+3
-3
ee/spec/lib/banzai/filter/references/epic_reference_filter_spec.rb
...ib/banzai/filter/references/epic_reference_filter_spec.rb
+1
-1
ee/spec/lib/banzai/filter/references/iteration_reference_filter_spec.rb
...nzai/filter/references/iteration_reference_filter_spec.rb
+1
-1
ee/spec/lib/banzai/filter/references/label_reference_filter_spec.rb
...b/banzai/filter/references/label_reference_filter_spec.rb
+1
-1
ee/spec/lib/banzai/filter/references/vulnerability_reference_filters_spec.rb
...filter/references/vulnerability_reference_filters_spec.rb
+1
-1
lib/banzai/filter/references/abstract_reference_filter.rb
lib/banzai/filter/references/abstract_reference_filter.rb
+335
-333
lib/banzai/filter/references/alert_reference_filter.rb
lib/banzai/filter/references/alert_reference_filter.rb
+19
-17
lib/banzai/filter/references/commit_range_reference_filter.rb
...banzai/filter/references/commit_range_reference_filter.rb
+31
-29
lib/banzai/filter/references/commit_reference_filter.rb
lib/banzai/filter/references/commit_reference_filter.rb
+61
-59
lib/banzai/filter/references/design_reference_filter.rb
lib/banzai/filter/references/design_reference_filter.rb
+81
-79
lib/banzai/filter/references/epic_reference_filter.rb
lib/banzai/filter/references/epic_reference_filter.rb
+12
-10
lib/banzai/filter/references/external_issue_reference_filter.rb
...nzai/filter/references/external_issue_reference_filter.rb
+91
-89
lib/banzai/filter/references/feature_flag_reference_filter.rb
...banzai/filter/references/feature_flag_reference_filter.rb
+22
-20
lib/banzai/filter/references/issuable_reference_filter.rb
lib/banzai/filter/references/issuable_reference_filter.rb
+11
-9
lib/banzai/filter/references/issue_reference_filter.rb
lib/banzai/filter/references/issue_reference_filter.rb
+41
-39
lib/banzai/filter/references/iteration_reference_filter.rb
lib/banzai/filter/references/iteration_reference_filter.rb
+8
-6
lib/banzai/filter/references/label_reference_filter.rb
lib/banzai/filter/references/label_reference_filter.rb
+98
-96
lib/banzai/filter/references/merge_request_reference_filter.rb
...anzai/filter/references/merge_request_reference_filter.rb
+70
-68
lib/banzai/filter/references/milestone_reference_filter.rb
lib/banzai/filter/references/milestone_reference_filter.rb
+97
-95
lib/banzai/filter/references/project_reference_filter.rb
lib/banzai/filter/references/project_reference_filter.rb
+88
-86
lib/banzai/filter/references/reference_filter.rb
lib/banzai/filter/references/reference_filter.rb
+167
-165
lib/banzai/filter/references/snippet_reference_filter.rb
lib/banzai/filter/references/snippet_reference_filter.rb
+19
-17
lib/banzai/filter/references/user_reference_filter.rb
lib/banzai/filter/references/user_reference_filter.rb
+135
-133
lib/banzai/filter/references/vulnerability_reference_filter.rb
...anzai/filter/references/vulnerability_reference_filter.rb
+12
-10
lib/banzai/pipeline/gfm_pipeline.rb
lib/banzai/pipeline/gfm_pipeline.rb
+13
-13
lib/banzai/pipeline/label_pipeline.rb
lib/banzai/pipeline/label_pipeline.rb
+1
-1
lib/banzai/pipeline/single_line_pipeline.rb
lib/banzai/pipeline/single_line_pipeline.rb
+9
-9
spec/lib/banzai/filter/references/abstract_reference_filter_spec.rb
...anzai/filter/references/abstract_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/alert_reference_filter_spec.rb
...b/banzai/filter/references/alert_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/commit_range_reference_filter_spec.rb
...i/filter/references/commit_range_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/commit_reference_filter_spec.rb
.../banzai/filter/references/commit_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/design_reference_filter_spec.rb
.../banzai/filter/references/design_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/external_issue_reference_filter_spec.rb
...filter/references/external_issue_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/feature_flag_reference_filter_spec.rb
...i/filter/references/feature_flag_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/issue_reference_filter_spec.rb
...b/banzai/filter/references/issue_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/label_reference_filter_spec.rb
...b/banzai/filter/references/label_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/merge_request_reference_filter_spec.rb
.../filter/references/merge_request_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/milestone_reference_filter_spec.rb
...nzai/filter/references/milestone_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/project_reference_filter_spec.rb
...banzai/filter/references/project_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/reference_filter_spec.rb
spec/lib/banzai/filter/references/reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/snippet_reference_filter_spec.rb
...banzai/filter/references/snippet_reference_filter_spec.rb
+1
-1
spec/lib/banzai/filter/references/user_reference_filter_spec.rb
...ib/banzai/filter/references/user_reference_filter_spec.rb
+1
-1
spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
+1
-1
No files found.
ee/lib/ee/banzai/filter/references/abstract_reference_filter.rb
View file @
7ecc247a
...
...
@@ -3,6 +3,7 @@
module
EE
module
Banzai
module
Filter
module
References
module
AbstractReferenceFilter
extend
::
Gitlab
::
Utils
::
Override
...
...
@@ -13,4 +14,5 @@ module EE
end
end
end
end
end
ee/lib/ee/banzai/filter/references/epic_reference_filter.rb
View file @
7ecc247a
...
...
@@ -3,6 +3,7 @@
module
EE
module
Banzai
module
Filter
module
References
# HTML filter that replaces epic references with links. References to
# epics that do not exist are ignored.
#
...
...
@@ -52,4 +53,5 @@ module EE
end
end
end
end
end
ee/lib/ee/banzai/filter/references/iteration_reference_filter.rb
View file @
7ecc247a
...
...
@@ -3,6 +3,7 @@
module
EE
module
Banzai
module
Filter
module
References
# HTML filter that replaces iteration references with links.
module
IterationReferenceFilter
include
::
Gitlab
::
Utils
::
StrongMemoize
...
...
@@ -41,7 +42,7 @@ module EE
if
iteration
iterations
[
iteration
.
id
]
=
yield
match
,
iteration
.
id
,
$~
[
:project
],
$~
[
:namespace
],
$~
"
#{
::
Banzai
::
Filter
::
AbstractReferenceFilter
::
REFERENCE_PLACEHOLDER
}#{
iteration
.
id
}
"
"
#{
::
Banzai
::
Filter
::
References
::
AbstractReferenceFilter
::
REFERENCE_PLACEHOLDER
}#{
iteration
.
id
}
"
else
match
end
...
...
@@ -114,4 +115,5 @@ module EE
end
end
end
end
end
ee/lib/ee/banzai/filter/references/label_reference_filter.rb
View file @
7ecc247a
...
...
@@ -3,6 +3,7 @@
module
EE
module
Banzai
module
Filter
module
References
module
LabelReferenceFilter
extend
::
Gitlab
::
Utils
::
Override
...
...
@@ -25,4 +26,5 @@ module EE
end
end
end
end
end
ee/lib/ee/banzai/filter/references/vulnerability_reference_filter.rb
View file @
7ecc247a
...
...
@@ -3,6 +3,7 @@
module
EE
module
Banzai
module
Filter
module
References
# HTML filter that replaces vulnerability references with links. References to
# vulnerabilities that do not exist are ignored.
#
...
...
@@ -62,4 +63,5 @@ module EE
end
end
end
end
end
ee/lib/ee/banzai/pipeline/gfm_pipeline.rb
View file @
7ecc247a
...
...
@@ -16,9 +16,9 @@ module EE
def
reference_filters
[
::
Banzai
::
Filter
::
EpicReferenceFilter
,
::
Banzai
::
Filter
::
IterationReferenceFilter
,
::
Banzai
::
Filter
::
VulnerabilityReferenceFilter
,
::
Banzai
::
Filter
::
References
::
EpicReferenceFilter
,
::
Banzai
::
Filter
::
References
::
IterationReferenceFilter
,
::
Banzai
::
Filter
::
References
::
VulnerabilityReferenceFilter
,
*
super
]
end
...
...
ee/lib/ee/banzai/pipeline/single_line_pipeline.rb
View file @
7ecc247a
...
...
@@ -9,9 +9,9 @@ module EE
class_methods
do
def
reference_filters
[
::
Banzai
::
Filter
::
EpicReferenceFilter
,
::
Banzai
::
Filter
::
IterationReferenceFilter
,
::
Banzai
::
Filter
::
VulnerabilityReferenceFilter
,
::
Banzai
::
Filter
::
References
::
EpicReferenceFilter
,
::
Banzai
::
Filter
::
References
::
IterationReferenceFilter
,
::
Banzai
::
Filter
::
References
::
VulnerabilityReferenceFilter
,
*
super
]
end
...
...
ee/spec/lib/banzai/filter/references/epic_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
EpicReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
EpicReferenceFilter
do
include
FilterSpecHelper
let
(
:urls
)
{
Gitlab
::
Routing
.
url_helpers
}
...
...
ee/spec/lib/banzai/filter/references/iteration_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
IterationReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
IterationReferenceFilter
do
include
FilterSpecHelper
let
(
:parent_group
)
{
create
(
:group
,
:public
)
}
...
...
ee/spec/lib/banzai/filter/references/label_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
LabelReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
LabelReferenceFilter
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
,
name:
'sample-project'
)
}
...
...
ee/spec/lib/banzai/filter/references/vulnerability_reference_filters_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
VulnerabilityReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
VulnerabilityReferenceFilter
do
include
FilterSpecHelper
let
(
:urls
)
{
Gitlab
::
Routing
.
url_helpers
}
...
...
lib/banzai/filter/references/abstract_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# Issues, merge requests, Snippets, Commits and Commit Ranges share
# similar functionality in reference filtering.
class
AbstractReferenceFilter
<
ReferenceFilter
...
...
@@ -441,6 +442,7 @@ module Banzai
end
end
end
end
end
Banzai
::
Filter
::
AbstractReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter
::AbstractReferenceFilter'
)
Banzai
::
Filter
::
References
::
AbstractReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter::References
::AbstractReferenceFilter'
)
lib/banzai/filter/references/alert_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
class
AlertReferenceFilter
<
IssuableReferenceFilter
self
.
reference_type
=
:alert
...
...
@@ -26,4 +27,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/commit_range_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces commit range references with links.
#
# This filter supports cross-project references.
...
...
@@ -43,4 +44,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/commit_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces commit references with links.
#
# This filter supports cross-project references.
...
...
@@ -83,4 +84,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/design_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
class
DesignReferenceFilter
<
AbstractReferenceFilter
class
Identifier
include
Comparable
...
...
@@ -104,4 +105,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/epic_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# The actual filter is implemented in the EE mixin
class
EpicReferenceFilter
<
IssuableReferenceFilter
self
.
reference_type
=
:epic
...
...
@@ -17,6 +18,7 @@ module Banzai
end
end
end
end
end
Banzai
::
Filter
::
EpicReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter
::EpicReferenceFilter'
)
Banzai
::
Filter
::
References
::
EpicReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter::References
::EpicReferenceFilter'
)
lib/banzai/filter/references/external_issue_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces external issue tracker references with links.
# References are ignored if the project doesn't use an external issue
# tracker.
...
...
@@ -115,4 +116,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/feature_flag_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
class
FeatureFlagReferenceFilter
<
IssuableReferenceFilter
self
.
reference_type
=
:feature_flag
...
...
@@ -30,4 +31,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/issuable_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
class
IssuableReferenceFilter
<
AbstractReferenceFilter
def
record_identifier
(
record
)
record
.
iid
.
to_i
...
...
@@ -16,4 +17,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/issue_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces issue references with links. References to
# issues that do not exist are ignored.
#
...
...
@@ -54,4 +55,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/iteration_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# The actual filter is implemented in the EE mixin
class
IterationReferenceFilter
<
AbstractReferenceFilter
self
.
reference_type
=
:iteration
...
...
@@ -11,6 +12,7 @@ module Banzai
end
end
end
end
end
Banzai
::
Filter
::
IterationReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter
::IterationReferenceFilter'
)
Banzai
::
Filter
::
References
::
IterationReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter::References
::IterationReferenceFilter'
)
lib/banzai/filter/references/label_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces label references with links.
class
LabelReferenceFilter
<
AbstractReferenceFilter
self
.
reference_type
=
:label
...
...
@@ -124,6 +125,7 @@ module Banzai
end
end
end
end
end
Banzai
::
Filter
::
LabelReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter
::LabelReferenceFilter'
)
Banzai
::
Filter
::
References
::
LabelReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter::References
::LabelReferenceFilter'
)
lib/banzai/filter/references/merge_request_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces merge request references with links. References
# to merge requests that do not exist are ignored.
#
...
...
@@ -94,4 +95,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/milestone_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces milestone references with links.
class
MilestoneReferenceFilter
<
AbstractReferenceFilter
include
Gitlab
::
Utils
::
StrongMemoize
...
...
@@ -135,4 +136,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/project_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces project references with links.
class
ProjectReferenceFilter
<
ReferenceFilter
self
.
reference_type
=
:project
...
...
@@ -114,4 +115,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/reference_filter.rb
View file @
7ecc247a
...
...
@@ -3,6 +3,7 @@
# Generated HTML is transformed back to GFM by app/assets/javascripts/behaviors/markdown/nodes/reference.js
module
Banzai
module
Filter
module
References
# Base class for GitLab Flavored Markdown reference filters.
#
# References within <pre>, <code>, <a>, and <style> elements are ignored.
...
...
@@ -212,4 +213,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/snippet_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces snippet references with links. References to
# snippets that do not exist are ignored.
#
...
...
@@ -26,4 +27,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/user_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# HTML filter that replaces user or group references with links.
#
# A special `@all` reference is also supported.
...
...
@@ -177,4 +178,5 @@ module Banzai
end
end
end
end
end
lib/banzai/filter/references/vulnerability_reference_filter.rb
View file @
7ecc247a
...
...
@@ -2,6 +2,7 @@
module
Banzai
module
Filter
module
References
# The actual filter is implemented in the EE mixin
class
VulnerabilityReferenceFilter
<
IssuableReferenceFilter
self
.
reference_type
=
:vulnerability
...
...
@@ -17,6 +18,7 @@ module Banzai
end
end
end
end
end
Banzai
::
Filter
::
VulnerabilityReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter
::VulnerabilityReferenceFilter'
)
Banzai
::
Filter
::
References
::
VulnerabilityReferenceFilter
.
prepend_if_ee
(
'EE::Banzai::Filter::References
::VulnerabilityReferenceFilter'
)
lib/banzai/pipeline/gfm_pipeline.rb
View file @
7ecc247a
...
...
@@ -51,19 +51,19 @@ module Banzai
def
self
.
reference_filters
[
Filter
::
UserReferenceFilter
,
Filter
::
ProjectReferenceFilter
,
Filter
::
DesignReferenceFilter
,
Filter
::
IssueReferenceFilter
,
Filter
::
ExternalIssueReferenceFilter
,
Filter
::
MergeRequestReferenceFilter
,
Filter
::
SnippetReferenceFilter
,
Filter
::
CommitRangeReferenceFilter
,
Filter
::
CommitReferenceFilter
,
Filter
::
LabelReferenceFilter
,
Filter
::
MilestoneReferenceFilter
,
Filter
::
AlertReferenceFilter
,
Filter
::
FeatureFlagReferenceFilter
Filter
::
References
::
UserReferenceFilter
,
Filter
::
References
::
ProjectReferenceFilter
,
Filter
::
References
::
DesignReferenceFilter
,
Filter
::
References
::
IssueReferenceFilter
,
Filter
::
References
::
ExternalIssueReferenceFilter
,
Filter
::
References
::
MergeRequestReferenceFilter
,
Filter
::
References
::
SnippetReferenceFilter
,
Filter
::
References
::
CommitRangeReferenceFilter
,
Filter
::
References
::
CommitReferenceFilter
,
Filter
::
References
::
LabelReferenceFilter
,
Filter
::
References
::
MilestoneReferenceFilter
,
Filter
::
References
::
AlertReferenceFilter
,
Filter
::
References
::
FeatureFlagReferenceFilter
]
end
...
...
lib/banzai/pipeline/label_pipeline.rb
View file @
7ecc247a
...
...
@@ -6,7 +6,7 @@ module Banzai
def
self
.
filters
@filters
||=
FilterArray
[
Filter
::
SanitizationFilter
,
Filter
::
LabelReferenceFilter
Filter
::
References
::
LabelReferenceFilter
]
end
end
...
...
lib/banzai/pipeline/single_line_pipeline.rb
View file @
7ecc247a
...
...
@@ -17,15 +17,15 @@ module Banzai
def
self
.
reference_filters
[
Filter
::
UserReferenceFilter
,
Filter
::
IssueReferenceFilter
,
Filter
::
ExternalIssueReferenceFilter
,
Filter
::
MergeRequestReferenceFilter
,
Filter
::
SnippetReferenceFilter
,
Filter
::
CommitRangeReferenceFilter
,
Filter
::
CommitReferenceFilter
,
Filter
::
AlertReferenceFilter
,
Filter
::
FeatureFlagReferenceFilter
Filter
::
References
::
UserReferenceFilter
,
Filter
::
References
::
IssueReferenceFilter
,
Filter
::
References
::
ExternalIssueReferenceFilter
,
Filter
::
References
::
MergeRequestReferenceFilter
,
Filter
::
References
::
SnippetReferenceFilter
,
Filter
::
References
::
CommitRangeReferenceFilter
,
Filter
::
References
::
CommitReferenceFilter
,
Filter
::
References
::
AlertReferenceFilter
,
Filter
::
References
::
FeatureFlagReferenceFilter
]
end
...
...
spec/lib/banzai/filter/references/abstract_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
AbstractReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
AbstractReferenceFilter
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:doc
)
{
Nokogiri
::
HTML
.
fragment
(
''
)
}
...
...
spec/lib/banzai/filter/references/alert_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
AlertReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
AlertReferenceFilter
do
include
FilterSpecHelper
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/banzai/filter/references/commit_range_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
CommitRangeReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
CommitRangeReferenceFilter
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
...
...
spec/lib/banzai/filter/references/commit_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
CommitReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
CommitReferenceFilter
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
...
...
spec/lib/banzai/filter/references/design_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
DesignReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
DesignReferenceFilter
do
include
FilterSpecHelper
include
DesignManagementTestHelpers
...
...
spec/lib/banzai/filter/references/external_issue_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
ExternalIssueReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
ExternalIssueReferenceFilter
do
include
FilterSpecHelper
let_it_be_with_refind
(
:project
)
{
create
(
:project
)
}
...
...
spec/lib/banzai/filter/references/feature_flag_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
FeatureFlagReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
FeatureFlagReferenceFilter
do
include
FilterSpecHelper
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/banzai/filter/references/issue_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
IssueReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
IssueReferenceFilter
do
include
FilterSpecHelper
include
DesignManagementTestHelpers
...
...
spec/lib/banzai/filter/references/label_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'html/pipeline'
RSpec
.
describe
Banzai
::
Filter
::
LabelReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
LabelReferenceFilter
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
,
name:
'sample-project'
)
}
...
...
spec/lib/banzai/filter/references/merge_request_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
MergeRequestReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
MergeRequestReferenceFilter
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/banzai/filter/references/milestone_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
MilestoneReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
MilestoneReferenceFilter
do
include
FilterSpecHelper
let_it_be
(
:parent_group
)
{
create
(
:group
,
:public
)
}
...
...
spec/lib/banzai/filter/references/project_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
ProjectReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
ProjectReferenceFilter
do
include
FilterSpecHelper
def
invalidate_reference
(
reference
)
...
...
spec/lib/banzai/filter/references/reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
ReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
Reference
s
::
Reference
Filter
do
let
(
:project
)
{
build_stubbed
(
:project
)
}
describe
'#each_node'
do
...
...
spec/lib/banzai/filter/references/snippet_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
SnippetReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
SnippetReferenceFilter
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/banzai/filter/references/user_reference_filter_spec.rb
View file @
7ecc247a
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
UserReferenceFilter
do
RSpec
.
describe
Banzai
::
Filter
::
References
::
UserReferenceFilter
do
include
FilterSpecHelper
def
get_reference
(
user
)
...
...
spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
View file @
7ecc247a
...
...
@@ -25,7 +25,7 @@ RSpec.describe Banzai::Pipeline::GfmPipeline do
issue
=
create
(
:issue
,
project:
project
)
markdown
=
"text
#{
issue
.
to_reference
(
project
,
full:
true
)
}
"
expect_any_instance_of
(
Banzai
::
Filter
::
ReferenceFilter
).
to
receive
(
:each_node
).
once
expect_any_instance_of
(
Banzai
::
Filter
::
Reference
s
::
Reference
Filter
).
to
receive
(
:each_node
).
once
described_class
.
call
(
markdown
,
project:
project
)
end
...
...
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