Skip to content
Snippets Groups Projects
Commit d6718c2b authored by Vasilii Iakliushin's avatar Vasilii Iakliushin :palm_tree: Committed by Olena Horal-Koretska
Browse files

Remove .md from help_page_links (step 2)

parent c09de8fa
No related branches found
No related tags found
2 merge requests!135637Implement secret detection gem scanning logic,!133942Remove .md from help_page_links (step 2)
Showing
with 36 additions and 55 deletions
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-10-26 11:21:24 +0200 using Haml-Lint version 0.40.1.
# on 2023-10-30 15:10:05 +0100 using Haml-Lint version 0.40.1.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new
......@@ -8,30 +8,11 @@
linters:
# Offense count: 49
# Offense count: 37
DocumentationLinks:
exclude:
- "app/views/admin/application_settings/_email.html.haml"
- "app/views/admin/application_settings/_error_tracking.html.haml"
- "app/views/admin/application_settings/_floc.html.haml"
- "app/views/admin/application_settings/_gitlab_shell_operation_limits.html.haml"
- "app/views/admin/application_settings/_localization.html.haml"
- "app/views/admin/application_settings/_projects_api_limits.html.haml"
- "app/views/admin/application_settings/_runner_registrars_form.html.haml"
- "app/views/admin/application_settings/general.html.haml"
- "app/views/admin/application_settings/network.html.haml"
- "app/views/admin/application_settings/preferences.html.haml"
- "app/views/admin/application_settings/reporting.html.haml"
- "app/views/admin/application_settings/repository.html.haml"
- "app/views/admin/dev_ops_report/_score.html.haml"
- "app/views/groups/_import_group_from_another_instance_panel.html.haml"
- "app/views/profiles/gpg_keys/index.html.haml"
- "app/views/profiles/keys/_key.html.haml"
- "app/views/profiles/keys/index.html.haml"
- "app/views/profiles/personal_access_tokens/index.html.haml"
- "app/views/profiles/two_factor_auths/show.html.haml"
- "app/views/projects/blob/_pipeline_tour_success.html.haml"
- "app/views/projects/commit/_signature_badge.html.haml"
- "app/views/projects/settings/merge_requests/_merge_request_merge_commit_template.html.haml"
- "app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml"
- "app/views/projects/settings/merge_requests/_merge_request_squash_commit_template.html.haml"
......@@ -59,4 +40,4 @@ linters:
- "ee/app/views/projects/settings/merge_requests/_merge_request_approvals_settings.html.haml"
- "ee/app/views/projects/settings/merge_requests/_target_branch_rules_settings.html.haml"
- "ee/app/views/shared/_new_user_signups_cap_reached_alert.html.haml"
- "ee/app/views/shared/promotions/_promote_mobile_devops.html.haml"
- "ee/app/views/shared/promotions/_promote_mobile_devops.html.haml"
\ No newline at end of file
......@@ -38,7 +38,7 @@ def js_cluster_form_data(cluster, can_edit)
environment_scope: cluster.environment_scope,
base_domain: cluster.base_domain,
auto_devops_help_path: help_page_path('topics/autodevops/index'),
external_endpoint_help_path: help_page_path('user/project/clusters/gitlab_managed_clusters.md', anchor: 'base-domain')
external_endpoint_help_path: help_page_path('user/project/clusters/gitlab_managed_clusters', anchor: 'base-domain')
}
end
......
......@@ -85,8 +85,8 @@ def project_and_environment_metrics_data(project, environment)
def static_metrics_data
{
'documentation_path' => help_page_path('administration/monitoring/prometheus/index.md'),
'add_dashboard_documentation_path' => help_page_path('operations/metrics/dashboards/index.md', anchor: 'add-a-new-dashboard-to-your-project'),
'documentation_path' => help_page_path('administration/monitoring/prometheus/index'),
'add_dashboard_documentation_path' => help_page_path('operations/metrics/dashboards/index', anchor: 'add-a-new-dashboard-to-your-project'),
'empty_getting_started_svg_path' => image_path('illustrations/monitoring/getting_started.svg'),
'empty_loading_svg_path' => image_path('illustrations/monitoring/loading.svg'),
'empty_no_data_svg_path' => image_path('illustrations/monitoring/no_data.svg'),
......
......@@ -5,7 +5,7 @@ module IdeHelper
def ide_data(project:, fork_info:, params:)
base_data = {
'use-new-web-ide' => use_new_web_ide?.to_s,
'new-web-ide-help-page-path' => help_page_path('user/project/web_ide/index.md', anchor: 'vscode-reimplementation'),
'new-web-ide-help-page-path' => help_page_path('user/project/web_ide/index', anchor: 'vscode-reimplementation'),
'sign-in-path' => new_session_path(current_user),
'user-preferences-path' => profile_preferences_path
}.merge(use_new_web_ide? ? new_ide_data(project: project) : legacy_ide_data(project: project))
......@@ -71,16 +71,16 @@ def legacy_ide_data(project:)
'switch-editor-svg-path': image_path('illustrations/rocket-launch-md.svg'),
'promotion-svg-path': image_path('illustrations/web-ide_promotion.svg'),
'ci-help-page-path' => help_page_path('ci/quick_start/index'),
'web-ide-help-page-path' => help_page_path('user/project/web_ide/index.md'),
'web-ide-help-page-path' => help_page_path('user/project/web_ide/index'),
'render-whitespace-in-code': current_user.render_whitespace_in_code.to_s,
'default-branch' => project && project.default_branch,
'project' => convert_to_project_entity_json(project),
'enable-environments-guidance' => enable_environments_guidance?(project).to_s,
'preview-markdown-path' => project && preview_markdown_path(project),
'web-terminal-svg-path' => image_path('illustrations/web-ide_promotion.svg'),
'web-terminal-help-path' => help_page_path('user/project/web_ide/index.md', anchor: 'interactive-web-terminals-for-the-web-ide'),
'web-terminal-config-help-path' => help_page_path('user/project/web_ide/index.md', anchor: 'web-ide-configuration-file'),
'web-terminal-runners-help-path' => help_page_path('user/project/web_ide/index.md', anchor: 'runner-configuration')
'web-terminal-help-path' => help_page_path('user/project/web_ide/index', anchor: 'interactive-web-terminals-for-the-web-ide'),
'web-terminal-config-help-path' => help_page_path('user/project/web_ide/index', anchor: 'web-ide-configuration-file'),
'web-terminal-runners-help-path' => help_page_path('user/project/web_ide/index', anchor: 'runner-configuration')
}
end
......
......@@ -187,7 +187,7 @@ def diffs_tab_pane_data(project, merge_request, params)
endpoint_batch: diffs_batch_project_json_merge_request_path(project, merge_request, 'json', params),
endpoint_coverage: @coverage_path,
endpoint_diff_for_path: diff_for_path_namespace_project_merge_request_path(format: 'json', id: merge_request.iid, namespace_id: project.namespace.to_param, project_id: project.path),
help_page_path: help_page_path('user/project/merge_requests/reviews/suggestions.md'),
help_page_path: help_page_path('user/project/merge_requests/reviews/suggestions'),
current_user_data: @current_user_data,
update_current_user_path: @update_current_user_path,
project_path: project_path(merge_request.project),
......@@ -219,7 +219,7 @@ def how_merge_modal_data(merge_request)
source_project_full_path: merge_request.source_project&.full_path,
source_project_default_url: merge_request.source_project && default_url_to_repo(merge_request.source_project),
target_branch: merge_request.target_branch,
reviewing_docs_path: help_page_path('user/project/merge_requests/reviews/index.md', anchor: "checkout-merge-requests-locally-through-the-head-ref")
reviewing_docs_path: help_page_path('user/project/merge_requests/reviews/index', anchor: "checkout-merge-requests-locally-through-the-head-ref")
}
end
......
......@@ -21,7 +21,7 @@ def alerts_settings_data(disabled: false)
'prometheus_authorization_key' => @project.alerting_setting&.token,
'prometheus_api_url' => prometheus_integration.api_url,
'prometheus_url' => notify_project_prometheus_alerts_url(@project, format: :json),
'alerts_setup_url' => help_page_path('operations/incident_management/integrations.md', anchor: 'configuration'),
'alerts_setup_url' => help_page_path('operations/incident_management/integrations', anchor: 'configuration'),
'alerts_usage_url' => project_alert_management_index_path(@project),
'disabled' => disabled.to_s,
'project_path' => @project.full_path,
......
......@@ -122,8 +122,8 @@ def default_preferred_language_choices
def integration_views
[].tap do |views|
views << { name: 'gitpod', message: gitpod_enable_description, message_url: gitpod_url_placeholder, help_link: help_page_path('integration/gitpod.md') } if Gitlab::CurrentSettings.gitpod_enabled
views << { name: 'sourcegraph', message: sourcegraph_url_message, message_url: Gitlab::CurrentSettings.sourcegraph_url, help_link: help_page_path('user/profile/preferences.md', anchor: 'sourcegraph') } if Gitlab::Sourcegraph.feature_available? && Gitlab::CurrentSettings.sourcegraph_enabled
views << { name: 'gitpod', message: gitpod_enable_description, message_url: gitpod_url_placeholder, help_link: help_page_path('integration/gitpod') } if Gitlab::CurrentSettings.gitpod_enabled
views << { name: 'sourcegraph', message: sourcegraph_url_message, message_url: Gitlab::CurrentSettings.sourcegraph_url, help_link: help_page_path('user/profile/preferences', anchor: 'sourcegraph') } if Gitlab::Sourcegraph.feature_available? && Gitlab::CurrentSettings.sourcegraph_enabled
end
end
......
......@@ -187,7 +187,7 @@ def last_push_event
end
def link_to_autodeploy_doc
link_to _('About auto deploy'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-deploy'), target: '_blank', rel: 'noopener'
link_to _('About auto deploy'), help_page_path('topics/autodevops/stages', anchor: 'auto-deploy'), target: '_blank', rel: 'noopener'
end
def autodeploy_flash_notice(branch_name)
......
......@@ -61,7 +61,7 @@ def health_data(clusterable)
'clusters-path': clusterable.index_path,
'dashboard-endpoint': clusterable.metrics_dashboard_path(cluster),
'documentation-path': help_page_path('user/infrastructure/clusters/manage/clusters_health'),
'add-dashboard-documentation-path': help_page_path('operations/metrics/dashboards/index.md', anchor: 'add-a-new-dashboard-to-your-project'),
'add-dashboard-documentation-path': help_page_path('operations/metrics/dashboards/index', anchor: 'add-a-new-dashboard-to-your-project'),
'empty-getting-started-svg-path': image_path('illustrations/monitoring/getting_started.svg'),
'empty-loading-svg-path': image_path('illustrations/monitoring/loading.svg'),
'empty-no-data-svg-path': image_path('illustrations/monitoring/no_data.svg'),
......
......@@ -73,11 +73,11 @@ class IssueEntity < IssuableEntity
end
expose :confidential_issues_docs_path, if: -> (issue) { issue.confidential? } do |issue|
help_page_path('user/project/issues/confidential_issues.md')
help_page_path('user/project/issues/confidential_issues')
end
expose :locked_discussion_docs_path, if: -> (issue) { issue.discussion_locked? } do |issue|
help_page_path('user/discussions/index.md', anchor: 'prevent-comments-by-locking-an-issue')
help_page_path('user/discussions/index', anchor: 'prevent-comments-by-locking-an-issue')
end
expose :is_project_archived do |issue|
......@@ -85,7 +85,7 @@ class IssueEntity < IssuableEntity
end
expose :archived_project_docs_path, if: -> (issue) { issue.project.archived? } do |issue|
help_page_path('user/project/settings/index.md', anchor: 'archive-a-project')
help_page_path('user/project/settings/index', anchor: 'archive-a-project')
end
expose :issue_email_participants do |issue|
......
......@@ -52,7 +52,7 @@ class MergeRequestNoteableEntity < IssuableEntity
end
expose :locked_discussion_docs_path, if: -> (merge_request) { merge_request.discussion_locked? } do |merge_request|
help_page_path('user/discussions/index.md', anchor: 'prevent-comments-by-locking-an-issue')
help_page_path('user/discussions/index', anchor: 'prevent-comments-by-locking-an-issue')
end
expose :is_project_archived do |merge_request|
......@@ -62,7 +62,7 @@ class MergeRequestNoteableEntity < IssuableEntity
expose :project_id
expose :archived_project_docs_path, if: -> (merge_request) { merge_request.project.archived? } do |merge_request|
help_page_path('user/project/settings/index.md', anchor: 'archive-a-project')
help_page_path('user/project/settings/index', anchor: 'archive-a-project')
end
private
......
......@@ -48,15 +48,15 @@ class MergeRequestWidgetEntity < Grape::Entity
end
expose :conflicts_docs_path do |merge_request|
help_page_path('user/project/merge_requests/conflicts.md')
help_page_path('user/project/merge_requests/conflicts')
end
expose :reviewing_and_managing_merge_requests_docs_path do |merge_request|
help_page_path('user/project/merge_requests/reviews/index.md', anchor: "checkout-merge-requests-locally-through-the-head-ref")
help_page_path('user/project/merge_requests/reviews/index', anchor: "checkout-merge-requests-locally-through-the-head-ref")
end
expose :merge_request_pipelines_docs_path do |merge_request|
help_page_path('ci/pipelines/merge_request_pipelines.md')
help_page_path('ci/pipelines/merge_request_pipelines')
end
expose :ci_environments_status_path do |merge_request|
......@@ -129,7 +129,7 @@ class MergeRequestWidgetEntity < Grape::Entity
end
expose :security_reports_docs_path do |merge_request|
help_page_path('user/application_security/index.md', anchor: 'view-security-scan-information-in-merge-requests')
help_page_path('user/application_security/index', anchor: 'view-security-scan-information-in-merge-requests')
end
expose :enabled_reports do |merge_request|
......
......@@ -92,7 +92,7 @@ def validate_default_branch_change
end
def ambiguous_head_documentation_link
url = Rails.application.routes.url_helpers.help_page_path('user/project/repository/branches/index.md', anchor: 'error-ambiguous-head-branch-exists')
url = Rails.application.routes.url_helpers.help_page_path('user/project/repository/branches/index', anchor: 'error-ambiguous-head-branch-exists')
format('<a href="%{url}" target="_blank" rel="noopener noreferrer">', url: url)
end
......
......@@ -10,7 +10,7 @@
= f.label :commit_email_hostname, _('Custom hostname (for private commit emails)'), class: 'label-bold'
= f.text_field :commit_email_hostname, class: 'form-control gl-form-input'
.form-text.text-muted
- commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('administration/settings/email.md', anchor: 'custom-hostname-for-private-commit-emails'), target: '_blank', rel: 'noopener noreferrer'
- commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('administration/settings/email', anchor: 'custom-hostname-for-private-commit-emails'), target: '_blank', rel: 'noopener noreferrer'
= _("Hostname used in private commit emails. %{learn_more}").html_safe % { learn_more: commit_email_hostname_docs_link }
= render_if_exists 'admin/application_settings/email_additional_text_setting', form: f
......
......@@ -7,8 +7,8 @@
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
= expanded ? _('Collapse') : _('Expand')
%p.gl-text-secondary
= _('Allows projects to track errors using an Opstrace integration.').html_safe % { link: help_page_path('operations/error_tracking.md') }
= link_to _('Learn more.'), help_page_path('operations/error_tracking.md'), target: '_blank', rel: 'noopener noreferrer'
= _('Allows projects to track errors using an Opstrace integration.').html_safe % { link: help_page_path('operations/error_tracking') }
= link_to _('Learn more.'), help_page_path('operations/error_tracking'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
......
......@@ -7,7 +7,7 @@
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
= expanded ? _('Collapse') : _('Expand')
%p.gl-text-secondary
- floc_link_url = help_page_path('administration/settings/floc.md')
- floc_link_url = help_page_path('administration/settings/floc')
- floc_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: floc_link_url }
= html_escape(s_('FloC|Configure whether you want to participate in FLoC. %{floc_link_start}What is FLoC?%{floc_link_end}')) % { floc_link_start: floc_link_start, floc_link_end: '</a>'.html_safe }
......
......@@ -6,7 +6,7 @@
= expanded_by_default? ? _('Collapse') : _('Expand')
%p.gl-text-secondary
= s_('ShellOperations|Limit the number of Git operations a user can perform per minute, per repository.')
= link_to _('Learn more.'), help_page_path('administration/settings/rate_limits_on_git_ssh_operations.md'), target: '_blank', rel: 'noopener noreferrer'
= link_to _('Learn more.'), help_page_path('administration/settings/rate_limits_on_git_ssh_operations'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-gitlab-shell-operation-limits-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
......
......@@ -7,7 +7,7 @@
= f.select :first_day_of_week, first_day_of_week_choices, {}, class: 'form-control'
.form-text.text-muted
= _('Default first day of the week in calendars and date pickers.')
= link_to _('Learn more.'), help_page_path('administration/settings/localization.md', anchor: 'change-the-default-first-day-of-the-week'), target: '_blank', rel: 'noopener noreferrer'
= link_to _('Learn more.'), help_page_path('administration/settings/localization', anchor: 'change-the-default-first-day-of-the-week'), target: '_blank', rel: 'noopener noreferrer'
.form-group
= f.label :time_tracking, _('Time tracking'), class: 'label-bold'
......
......@@ -6,7 +6,7 @@
= expanded_by_default? ? _('Collapse') : _('Expand')
%p.gl-text-secondary
= _('Set the per-IP address rate limit applicable to unauthenticated requests for getting a list of projects via the API.')
= link_to _('Learn more.'), help_page_path('administration/settings/rate_limit_on_projects_api.md'), target: '_blank', rel: 'noopener noreferrer'
= link_to _('Learn more.'), help_page_path('administration/settings/rate_limit_on_projects_api'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-projects-api-limits-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
......
......@@ -7,7 +7,7 @@
= s_('Runners|Runner version management')
%span.form-text.gl-mb-3.gl-mt-0
- help_text = s_('Runners|Official runner version data is periodically fetched from GitLab.com to determine whether the runners need upgrades.')
- learn_more_link = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope.md', anchor: 'determine-which-runners-need-to-be-upgraded'), target: '_blank', rel: 'noopener noreferrer'
- learn_more_link = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'determine-which-runners-need-to-be-upgraded'), target: '_blank', rel: 'noopener noreferrer'
= f.gitlab_ui_checkbox_component :update_runner_versions_enabled,
s_('Runners|Fetch GitLab Runner release version data from GitLab.com'),
help_text: '%{help_text} %{learn_more_link}'.html_safe % { help_text: help_text, learn_more_link: learn_more_link }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment