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
00105348
Commit
00105348
authored
Dec 10, 2021
by
Katrin Leinweber
Committed by
Fabio Pitino
Dec 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve several Rails/IncludeUrlHelper violations
parent
6ba31f27
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
15 deletions
+6
-15
.rubocop_todo/rails/include_url_helper.yml
.rubocop_todo/rails/include_url_helper.yml
+0
-4
app/presenters/ci/pipeline_presenter.rb
app/presenters/ci/pipeline_presenter.rb
+4
-5
app/presenters/prometheus_alert_presenter.rb
app/presenters/prometheus_alert_presenter.rb
+0
-2
ee/app/presenters/merge_request_approver_presenter.rb
ee/app/presenters/merge_request_approver_presenter.rb
+1
-2
lib/gitlab/ci/badge/metadata.rb
lib/gitlab/ci/badge/metadata.rb
+1
-2
No files found.
.rubocop_todo/rails/include_url_helper.yml
View file @
00105348
...
@@ -21,20 +21,16 @@ Rails/IncludeUrlHelper:
...
@@ -21,20 +21,16 @@ Rails/IncludeUrlHelper:
-
app/models/integrations/webex_teams.rb
-
app/models/integrations/webex_teams.rb
-
app/models/integrations/youtrack.rb
-
app/models/integrations/youtrack.rb
-
app/presenters/alert_management/alert_presenter.rb
-
app/presenters/alert_management/alert_presenter.rb
-
app/presenters/ci/pipeline_presenter.rb
-
app/presenters/environment_presenter.rb
-
app/presenters/environment_presenter.rb
-
app/presenters/gitlab/blame_presenter.rb
-
app/presenters/gitlab/blame_presenter.rb
-
app/presenters/merge_request_presenter.rb
-
app/presenters/merge_request_presenter.rb
-
app/presenters/project_presenter.rb
-
app/presenters/project_presenter.rb
-
app/presenters/prometheus_alert_presenter.rb
-
app/presenters/release_presenter.rb
-
app/presenters/release_presenter.rb
-
app/presenters/releases/evidence_presenter.rb
-
app/presenters/releases/evidence_presenter.rb
-
ee/app/helpers/license_helper.rb
-
ee/app/helpers/license_helper.rb
-
ee/app/models/integrations/github.rb
-
ee/app/models/integrations/github.rb
-
ee/app/presenters/merge_request_approver_presenter.rb
-
ee/spec/helpers/ee/projects/security/configuration_helper_spec.rb
-
ee/spec/helpers/ee/projects/security/configuration_helper_spec.rb
-
ee/spec/lib/banzai/filter/cross_project_issuable_information_filter_spec.rb
-
ee/spec/lib/banzai/filter/cross_project_issuable_information_filter_spec.rb
-
lib/gitlab/ci/badge/metadata.rb
-
spec/helpers/merge_requests_helper_spec.rb
-
spec/helpers/merge_requests_helper_spec.rb
-
spec/helpers/nav/top_nav_helper_spec.rb
-
spec/helpers/nav/top_nav_helper_spec.rb
-
spec/helpers/notify_helper_spec.rb
-
spec/helpers/notify_helper_spec.rb
...
...
app/presenters/ci/pipeline_presenter.rb
View file @
00105348
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
module
Ci
module
Ci
class
PipelinePresenter
<
Gitlab
::
View
::
Presenter
::
Delegated
class
PipelinePresenter
<
Gitlab
::
View
::
Presenter
::
Delegated
include
Gitlab
::
Utils
::
StrongMemoize
include
Gitlab
::
Utils
::
StrongMemoize
include
ActionView
::
Helpers
::
UrlHelper
delegator_override_with
Gitlab
::
Utils
::
StrongMemoize
# TODO: Remove `Gitlab::Utils::StrongMemoize` inclusion as it's duplicate
delegator_override_with
Gitlab
::
Utils
::
StrongMemoize
# TODO: Remove `Gitlab::Utils::StrongMemoize` inclusion as it's duplicate
delegator_override_with
ActionView
::
Helpers
::
TagHelper
# TODO: Remove `ActionView::Helpers::UrlHelper` inclusion as it overrides `Ci::Pipeline#tag`
delegator_override_with
ActionView
::
Helpers
::
TagHelper
# TODO: Remove `ActionView::Helpers::UrlHelper` inclusion as it overrides `Ci::Pipeline#tag`
...
@@ -108,7 +107,7 @@ module Ci
...
@@ -108,7 +107,7 @@ module Ci
end
end
def
link_to_pipeline_ref
def
link_to_pipeline_ref
link_to
(
pipeline
.
ref
,
ApplicationController
.
helpers
.
link_to
(
pipeline
.
ref
,
project_commits_path
(
pipeline
.
project
,
pipeline
.
ref
),
project_commits_path
(
pipeline
.
project
,
pipeline
.
ref
),
class:
"ref-name"
)
class:
"ref-name"
)
end
end
...
@@ -116,7 +115,7 @@ module Ci
...
@@ -116,7 +115,7 @@ module Ci
def
link_to_merge_request
def
link_to_merge_request
return
unless
merge_request_presenter
return
unless
merge_request_presenter
link_to
(
merge_request_presenter
.
to_reference
,
ApplicationController
.
helpers
.
link_to
(
merge_request_presenter
.
to_reference
,
project_merge_request_path
(
merge_request_presenter
.
project
,
merge_request_presenter
),
project_merge_request_path
(
merge_request_presenter
.
project
,
merge_request_presenter
),
class:
'mr-iid'
)
class:
'mr-iid'
)
end
end
...
@@ -143,7 +142,7 @@ module Ci
...
@@ -143,7 +142,7 @@ module Ci
private
private
def
plain_ref_name
def
plain_ref_name
content_tag
(
:span
,
pipeline
.
ref
,
class:
'ref-name'
)
ApplicationController
.
helpers
.
content_tag
(
:span
,
pipeline
.
ref
,
class:
'ref-name'
)
end
end
def
merge_request_presenter
def
merge_request_presenter
...
@@ -160,7 +159,7 @@ module Ci
...
@@ -160,7 +159,7 @@ module Ci
all_related_merge_requests
.
first
(
limit
).
map
do
|
merge_request
|
all_related_merge_requests
.
first
(
limit
).
map
do
|
merge_request
|
mr_path
=
project_merge_request_path
(
merge_request
.
project
,
merge_request
)
mr_path
=
project_merge_request_path
(
merge_request
.
project
,
merge_request
)
link_to
"
#{
merge_request
.
to_reference
}
#{
merge_request
.
title
}
"
,
mr_path
,
class:
'mr-iid'
ApplicationController
.
helpers
.
link_to
"
#{
merge_request
.
to_reference
}
#{
merge_request
.
title
}
"
,
mr_path
,
class:
'mr-iid'
end
end
end
end
...
...
app/presenters/prometheus_alert_presenter.rb
View file @
00105348
# frozen_string_literal: true
# frozen_string_literal: true
class
PrometheusAlertPresenter
<
Gitlab
::
View
::
Presenter
::
Delegated
class
PrometheusAlertPresenter
<
Gitlab
::
View
::
Presenter
::
Delegated
include
ActionView
::
Helpers
::
UrlHelper
presents
::
PrometheusAlert
,
as: :prometheus_alert
presents
::
PrometheusAlert
,
as: :prometheus_alert
def
humanized_text
def
humanized_text
...
...
ee/app/presenters/merge_request_approver_presenter.rb
View file @
00105348
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
# - skip_user
# - skip_user
class
MergeRequestApproverPresenter
<
Gitlab
::
View
::
Presenter
::
Simple
class
MergeRequestApproverPresenter
<
Gitlab
::
View
::
Presenter
::
Simple
include
ActionView
::
Helpers
::
TagHelper
include
ActionView
::
Helpers
::
TagHelper
include
ActionView
::
Helpers
::
UrlHelper
include
ActionView
::
Helpers
::
OutputSafetyHelper
include
ActionView
::
Helpers
::
OutputSafetyHelper
include
ActionView
::
RecordIdentifier
include
ActionView
::
RecordIdentifier
include
Gitlab
::
Utils
::
StrongMemoize
include
Gitlab
::
Utils
::
StrongMemoize
...
@@ -30,7 +29,7 @@ class MergeRequestApproverPresenter < Gitlab::View::Presenter::Simple
...
@@ -30,7 +29,7 @@ class MergeRequestApproverPresenter < Gitlab::View::Presenter::Simple
end
end
def
render_user
(
user
)
def
render_user
(
user
)
link_to
user
.
name
,
'#'
,
id:
dom_id
(
user
)
ApplicationController
.
helpers
.
link_to
user
.
name
,
'#'
,
id:
dom_id
(
user
)
end
end
def
show_code_owner_tips?
def
show_code_owner_tips?
...
...
lib/gitlab/ci/badge/metadata.rb
View file @
00105348
...
@@ -8,14 +8,13 @@ module Gitlab::Ci
...
@@ -8,14 +8,13 @@ module Gitlab::Ci
class
Metadata
class
Metadata
include
Gitlab
::
Routing
include
Gitlab
::
Routing
include
ActionView
::
Helpers
::
AssetTagHelper
include
ActionView
::
Helpers
::
AssetTagHelper
include
ActionView
::
Helpers
::
UrlHelper
def
initialize
(
badge
)
def
initialize
(
badge
)
@badge
=
badge
@badge
=
badge
end
end
def
to_html
def
to_html
link_to
(
image_tag
(
image_url
,
alt:
title
),
link_url
)
ApplicationController
.
helpers
.
link_to
(
image_tag
(
image_url
,
alt:
title
),
link_url
)
end
end
def
to_markdown
def
to_markdown
...
...
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