summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.gitlab/ci/frontend.gitlab-ci.yml19
-rw-r--r--.gitlab/ci/pages.gitlab-ci.yml3
-rw-r--r--.overcommit.yml.example28
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock10
-rw-r--r--app/assets/javascripts/behaviors/markdown/render_math.js2
-rw-r--r--app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue7
-rw-r--r--app/controllers/concerns/with_performance_bar.rb16
-rw-r--r--app/helpers/performance_bar_helper.rb4
-rw-r--r--app/models/project_services/chat_message/base_message.rb2
-rw-r--r--app/models/project_services/chat_message/push_message.rb8
-rw-r--r--app/models/project_services/chat_notification_service.rb19
-rw-r--r--app/models/project_services/microsoft_teams_service.rb2
-rw-r--r--app/services/quick_actions/interpret_service.rb2
-rw-r--r--app/views/admin/application_settings/_email.html.haml2
-rw-r--r--app/views/admin/application_settings/preferences.html.haml2
-rw-r--r--app/views/layouts/devise.html.haml3
-rw-r--r--app/views/layouts/devise_empty.html.haml3
-rw-r--r--app/views/layouts/nav/sidebar/_admin.html.haml2
-rw-r--r--app/views/peek/_bar.html.haml4
-rw-r--r--app/views/projects/pages/_access.html.haml4
-rw-r--r--changelogs/unreleased/60561-quick-action-label-first-for-issue.yml5
-rw-r--r--changelogs/unreleased/65304-add-pages-first-deployment-message.yml5
-rw-r--r--changelogs/unreleased/65389-wrong-format-on-ms-teams-integration-push-events-with-multi-line-commit-messages.yml5
-rw-r--r--changelogs/unreleased/66803-fix-uploads-relative-link-filter.yml5
-rw-r--r--changelogs/unreleased/add-warning-note-to-project-container-registry-setting.yml6
-rw-r--r--changelogs/unreleased/fix-peek-on-puma.yml5
-rw-r--r--changelogs/unreleased/sh-mermaid-8-2-6.yml5
-rw-r--r--changelogs/unreleased/swagger-ui-ci-page-template.yml5
-rw-r--r--doc/administration/geo/replication/updating_the_geo_nodes.md17
-rw-r--r--doc/ci/yaml/README.md2
-rw-r--r--doc/development/contributing/style_guides.md5
-rw-r--r--doc/development/documentation/index.md49
-rw-r--r--doc/integration/elasticsearch.md9
-rw-r--r--doc/user/application_security/sast/index.md15
-rw-r--r--doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md3
-rw-r--r--lib/banzai/filter/relative_link_filter.rb13
-rw-r--r--lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml29
-rw-r--r--lib/gitlab/diff/suggestion.rb2
-rw-r--r--lib/gitlab/gitaly_client.rb8
-rw-r--r--lib/gitlab/performance_bar.rb6
-rw-r--r--lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb4
-rw-r--r--lib/gitlab/regex.rb4
-rw-r--r--lib/gitlab/rugged_instrumentation.rb8
-rw-r--r--lib/gitlab/slash_commands/presenters/help.rb16
-rw-r--r--lib/peek/views/active_record.rb2
-rw-r--r--lib/peek/views/redis_detailed.rb6
-rw-r--r--locale/gitlab.pot9
-rw-r--r--package.json2
-rw-r--r--qa/qa/page/admin/menu.rb9
-rw-r--r--qa/qa/page/settings/common.rb2
-rw-r--r--spec/features/issues/user_comments_on_issue_spec.rb17
-rw-r--r--spec/features/projects/pages_spec.rb6
-rw-r--r--spec/features/users/login_spec.rb8
-rw-r--r--spec/helpers/markup_helper_spec.rb6
-rw-r--r--spec/lib/banzai/filter/relative_link_filter_spec.rb121
-rw-r--r--spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb2
-rw-r--r--spec/lib/gitlab/performance_bar_spec.rb26
-rw-r--r--spec/lib/peek/views/rugged_spec.rb2
-rw-r--r--spec/models/project_services/chat_message/push_message_spec.rb26
-rw-r--r--spec/support/shared_examples/controllers/issuables_requiring_filter_shared_examples.rb (renamed from spec/support/issuables_requiring_filter_shared_examples.rb)0
-rw-r--r--spec/support/shared_examples/models/active_record_enum_shared_examples.rb (renamed from spec/support/active_record_enum.rb)0
-rw-r--r--yarn.lock8
64 files changed, 388 insertions, 243 deletions
diff --git a/.gitignore b/.gitignore
index 104c6930050..3ffe4263c4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -81,4 +81,5 @@ package-lock.json
/junit_*.xml
/coverage-frontend/
jsdoc/
-**/tmp/rubocop_cache/** \ No newline at end of file
+**/tmp/rubocop_cache/**
+.overcommit.yml
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml
index df38cb4ff8e..0d73092cfba 100644
--- a/.gitlab/ci/frontend.gitlab-ci.yml
+++ b/.gitlab/ci/frontend.gitlab-ci.yml
@@ -234,25 +234,6 @@ qa-frontend-node:latest:
image: node:latest
allow_failure: true
-lint:javascript:report:
- extends:
- - .default-tags
- - .default-retry
- - .default-cache
- - .except-docs
- variables:
- SETUP_DB: "false"
- stage: post-test
- dependencies: []
- script:
- - date
- - yarn run eslint-report || true # ignore exit code
- artifacts:
- name: eslint-report
- expire_in: 31d
- paths:
- - eslint-report.html
-
jsdoc:
extends:
- .default-tags
diff --git a/.gitlab/ci/pages.gitlab-ci.yml b/.gitlab/ci/pages.gitlab-ci.yml
index 3247d7c4bce..5d13a72e224 100644
--- a/.gitlab/ci/pages.gitlab-ci.yml
+++ b/.gitlab/ci/pages.gitlab-ci.yml
@@ -9,13 +9,12 @@ pages:
- master@gitlab-org/gitlab-ce
- master@gitlab-org/gitlab-ee
stage: pages
- dependencies: ["coverage", "karma", "gitlab:assets:compile", "lint:javascript:report", "jsdoc"]
+ dependencies: ["coverage", "karma", "gitlab:assets:compile", "jsdoc"]
script:
- mv public/ .public/
- mkdir public/
- mv coverage/ public/coverage-ruby/ || true
- mv coverage-javascript/ public/coverage-javascript/ || true
- - mv eslint-report.html public/ || true
- mv webpack-report/ public/webpack-report/ || true
- cp .public/assets/application-*.css public/application.css || true
- cp .public/assets/application-*.css.gz public/application.css.gz || true
diff --git a/.overcommit.yml.example b/.overcommit.yml.example
new file mode 100644
index 00000000000..25823b9a8b3
--- /dev/null
+++ b/.overcommit.yml.example
@@ -0,0 +1,28 @@
+# Use this file to configure the Overcommit hooks you wish to use. This will
+# extend the default configuration defined in:
+# https://github.com/sds/overcommit/blob/master/config/default.yml
+#
+# At the topmost level of this YAML file is a key representing type of hook
+# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
+# customize each hook, such as whether to only run it on certain files (via
+# `include`), whether to only display output if it fails (via `quiet`), etc.
+#
+# For a complete list of hooks, see:
+# https://github.com/sds/overcommit/tree/master/lib/overcommit/hook
+#
+# For a complete list of options that you can use to customize hooks, see:
+# https://github.com/sds/overcommit#configuration
+#
+# Uncomment the following lines to make the configuration take effect.
+
+PreCommit:
+ RuboCop:
+ enabled: true
+# on_warn: fail # Treat all warnings as failures
+#
+#PostCheckout:
+# ALL: # Special hook name that customizes all hooks of this type
+# quiet: true # Change all post-checkout hooks to only display output on failure
+#
+# IndexTags:
+# enabled: true # Generate a tags file with `ctags` each time HEAD changes
diff --git a/Gemfile b/Gemfile
index 7eabce9929f..aa17e01b34d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -295,7 +295,8 @@ gem 'gettext', '~> 3.2.2', require: false, group: :development
gem 'batch-loader', '~> 1.4.0'
# Perf bar
-gem 'peek', '~> 1.0.1'
+# https://gitlab.com/gitlab-org/gitlab-ee/issues/13996
+gem 'gitlab-peek', '~> 0.0.1', require: 'peek'
# Snowplow events tracking
gem 'snowplow-tracker', '~> 0.6.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index ea2c44a2992..0803cf7f752 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -149,8 +149,6 @@ GEM
adamantium (~> 0.2.0)
equalizer (~> 0.0.9)
concurrent-ruby (1.1.5)
- concurrent-ruby-ext (1.1.5)
- concurrent-ruby (= 1.1.5)
connection_pool (2.2.2)
contracts (0.11.0)
crack (0.4.3)
@@ -321,6 +319,8 @@ GEM
opentracing (~> 0.4)
redis (> 3.0.0, < 5.0.0)
gitlab-markup (1.7.0)
+ gitlab-peek (0.0.1)
+ railties (>= 4.0.0)
gitlab-sidekiq-fetcher (0.5.1)
sidekiq (~> 5)
gitlab-styles (2.8.0)
@@ -635,10 +635,6 @@ GEM
parser (2.6.3.0)
ast (~> 2.4.0)
parslet (1.8.2)
- peek (1.0.1)
- concurrent-ruby (>= 0.9.0)
- concurrent-ruby-ext (>= 0.9.0)
- railties (>= 4.0.0)
pg (1.1.4)
po_to_json (1.0.1)
json (>= 1.6.0)
@@ -1100,6 +1096,7 @@ DEPENDENCIES
github-markup (~> 1.7.0)
gitlab-labkit (~> 0.5)
gitlab-markup (~> 1.7.0)
+ gitlab-peek (~> 0.0.1)
gitlab-sidekiq-fetcher (= 0.5.1)
gitlab-styles (~> 2.7)
gitlab_omniauth-ldap (~> 2.1.1)
@@ -1170,7 +1167,6 @@ DEPENDENCIES
omniauth_crowd (~> 2.2.0)
omniauth_openid_connect (~> 0.3.1)
org-ruby (~> 0.9.12)
- peek (~> 1.0.1)
pg (~> 1.1)
premailer-rails (~> 1.9.7)
prometheus-client-mmap (~> 0.9.8)
diff --git a/app/assets/javascripts/behaviors/markdown/render_math.js b/app/assets/javascripts/behaviors/markdown/render_math.js
index 53867b3096b..b5dbdbb7e86 100644
--- a/app/assets/javascripts/behaviors/markdown/render_math.js
+++ b/app/assets/javascripts/behaviors/markdown/render_math.js
@@ -102,7 +102,7 @@ class SafeMathRenderer {
maxSize: 20,
maxExpand: 20,
});
- } catch {
+ } catch (e) {
// Don't show a flash for now because it would override an existing flash message
el.textContent = s__('math|There was an error rendering this math block');
// el.style.color = '#d00';
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
index a223a8f5b08..ea867d30ce8 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
+++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
@@ -144,6 +144,10 @@ export default {
visibilityLevelDescription() {
return visibilityLevelDescriptions[this.visibilityLevel];
},
+
+ showContainerRegistryPublicNote() {
+ return this.visibilityLevel === visibilityOptions.PUBLIC;
+ },
},
watch: {
@@ -286,6 +290,9 @@ export default {
label="Container registry"
help-text="Every project can have its own space to store its Docker images"
>
+ <div v-if="showContainerRegistryPublicNote" class="text-muted">
+ {{ __('Note: the container registry is always visible when a project is public') }}
+ </div>
<project-feature-toggle
v-model="containerRegistryEnabled"
:disabled-input="!repositoryEnabled"
diff --git a/app/controllers/concerns/with_performance_bar.rb b/app/controllers/concerns/with_performance_bar.rb
index 4e0ae3c59eb..93ded59900d 100644
--- a/app/controllers/concerns/with_performance_bar.rb
+++ b/app/controllers/concerns/with_performance_bar.rb
@@ -3,15 +3,25 @@
module WithPerformanceBar
extend ActiveSupport::Concern
- def peek_enabled?
- return false unless Gitlab::PerformanceBar.enabled?(current_user)
+ included do
+ before_action :set_peek_enabled_for_current_request
+ end
+
+ private
+ def set_peek_enabled_for_current_request
Gitlab::SafeRequestStore.fetch(:peek_enabled) { cookie_or_default_value }
end
- private
+ # Needed for Peek's routing to work;
+ # Peek::ResultsController#restrict_non_access calls this method.
+ def peek_enabled?
+ Gitlab::PerformanceBar.enabled_for_request?
+ end
def cookie_or_default_value
+ return false unless Gitlab::PerformanceBar.enabled_for_user?(current_user)
+
if cookies[:perf_bar_enabled].present?
cookies[:perf_bar_enabled] == 'true'
else
diff --git a/app/helpers/performance_bar_helper.rb b/app/helpers/performance_bar_helper.rb
index 7518cec160c..b225e4206a9 100644
--- a/app/helpers/performance_bar_helper.rb
+++ b/app/helpers/performance_bar_helper.rb
@@ -1,9 +1,7 @@
# frozen_string_literal: true
module PerformanceBarHelper
- # This is a hack since using `alias_method :performance_bar_enabled?, :peek_enabled?`
- # in WithPerformanceBar breaks tests (but works in the browser).
def performance_bar_enabled?
- peek_enabled?
+ Gitlab::PerformanceBar.enabled_for_request?
end
end
diff --git a/app/models/project_services/chat_message/base_message.rb b/app/models/project_services/chat_message/base_message.rb
index 8c68ddc40f2..6542112ba32 100644
--- a/app/models/project_services/chat_message/base_message.rb
+++ b/app/models/project_services/chat_message/base_message.rb
@@ -10,6 +10,7 @@ module ChatMessage
attr_reader :user_avatar
attr_reader :project_name
attr_reader :project_url
+ attr_reader :commit_message_html
def initialize(params)
@markdown = params[:markdown] || false
@@ -18,6 +19,7 @@ module ChatMessage
@user_full_name = params.dig(:user, :name) || params[:user_full_name]
@user_name = params.dig(:user, :username) || params[:user_name]
@user_avatar = params.dig(:user, :avatar_url) || params[:user_avatar]
+ @commit_message_html = params[:commit_message_html] || false
end
def user_combined_name
diff --git a/app/models/project_services/chat_message/push_message.rb b/app/models/project_services/chat_message/push_message.rb
index 5dd0414b7e6..8163fca33a2 100644
--- a/app/models/project_services/chat_message/push_message.rb
+++ b/app/models/project_services/chat_message/push_message.rb
@@ -52,7 +52,8 @@ module ChatMessage
end
def commit_messages
- commits.map { |commit| compose_commit_message(commit) }.join("\n\n")
+ linebreak_chars = commit_message_html ? "<br/>\n<br/>\n" : "\n\n"
+ commits.map { |commit| compose_commit_message(commit) }.join(linebreak_chars)
end
def commit_message_attachments
@@ -63,6 +64,11 @@ module ChatMessage
author = commit[:author][:name]
id = Commit.truncate_sha(commit[:id])
message = commit[:message]
+
+ if commit_message_html
+ message = message.gsub(Gitlab::Regex.breakline_regex, "<br/>\n")
+ end
+
url = commit[:url]
"[#{id}](#{url}): #{message} - #{author}"
diff --git a/app/models/project_services/chat_notification_service.rb b/app/models/project_services/chat_notification_service.rb
index 7c9ecc6b821..cb75c89136e 100644
--- a/app/models/project_services/chat_notification_service.rb
+++ b/app/models/project_services/chat_notification_service.rb
@@ -5,17 +5,25 @@
class ChatNotificationService < Service
include ChatMessage
+ SUPPORTED_EVENTS = %w[
+ push issue confidential_issue merge_request note confidential_note
+ tag_push pipeline wiki_page deployment
+ ].freeze
+
+ EVENT_CHANNEL = proc { |event| "#{event}_channel" }
+
default_value_for :category, 'chat'
prop_accessor :webhook, :username, :channel
+
+ # Custom serialized properties initialization
+ prop_accessor(*SUPPORTED_EVENTS.map { |event| EVENT_CHANNEL[event] })
+
boolean_accessor :notify_only_broken_pipelines, :notify_only_default_branch
validates :webhook, presence: true, public_url: true, if: :activated?
def initialize_properties
- # Custom serialized properties initialization
- self.supported_events.each { |event| self.class.prop_accessor(event_channel_name(event)) }
-
if properties.nil?
self.properties = {}
self.notify_only_broken_pipelines = true
@@ -32,8 +40,7 @@ class ChatNotificationService < Service
end
def self.supported_events
- %w[push issue confidential_issue merge_request note confidential_note tag_push
- pipeline wiki_page deployment]
+ SUPPORTED_EVENTS
end
def fields
@@ -139,7 +146,7 @@ class ChatNotificationService < Service
end
def event_channel_name(event)
- "#{event}_channel"
+ EVENT_CHANNEL[event]
end
def project_name
diff --git a/app/models/project_services/microsoft_teams_service.rb b/app/models/project_services/microsoft_teams_service.rb
index c22a6dc26f6..2334b3f7f66 100644
--- a/app/models/project_services/microsoft_teams_service.rb
+++ b/app/models/project_services/microsoft_teams_service.rb
@@ -58,6 +58,6 @@ class MicrosoftTeamsService < ChatNotificationService
end
def custom_data(data)
- super(data).merge(markdown: true)
+ super(data).merge(markdown: true, commit_message_html: true)
end
end
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb
index 7f944e25887..e0924608a6d 100644
--- a/app/services/quick_actions/interpret_service.rb
+++ b/app/services/quick_actions/interpret_service.rb
@@ -5,8 +5,8 @@ module QuickActions
include Gitlab::Utils::StrongMemoize
include Gitlab::QuickActions::Dsl
include Gitlab::QuickActions::IssueActions
- include Gitlab::QuickActions::IssueAndMergeRequestActions
include Gitlab::QuickActions::IssuableActions
+ include Gitlab::QuickActions::IssueAndMergeRequestActions
include Gitlab::QuickActions::MergeRequestActions
include Gitlab::QuickActions::CommitActions
include Gitlab::QuickActions::CommonActions
diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml
index bd60ff0b99c..3dd72909805 100644
--- a/app/views/admin/application_settings/_email.html.haml
+++ b/app/views/admin/application_settings/_email.html.haml
@@ -25,4 +25,4 @@
= render_if_exists 'admin/application_settings/email_additional_text_setting', form: f
- = f.submit _('Save changes'), class: "btn btn-success"
+ = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'save_changes_button' }
diff --git a/app/views/admin/application_settings/preferences.html.haml b/app/views/admin/application_settings/preferences.html.haml
index c468d69d7b8..0ad76e56d0b 100644
--- a/app/views/admin/application_settings/preferences.html.haml
+++ b/app/views/admin/application_settings/preferences.html.haml
@@ -2,7 +2,7 @@
- page_title _("Preferences")
- @content_class = "limit-container-width" unless fluid_layout
-%section.settings.as-email.no-animate#js-email-settings{ class: ('expanded' if expanded_by_default?) }
+%section.settings.as-email.no-animate#js-email-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'email_section' } }
.settings-header
%h4
= _('Email')
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index e9a4a068599..d36e08f44a4 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -1,8 +1,9 @@
!!! 5
%html.devise-layout-html{ class: system_message_class }
= render "layouts/head"
- %body.ui-indigo.login-page.application.navless{ data: { page: body_data_page, qa_selector: 'login_page' } }
+ %body.ui-indigo.login-page.application.navless{ class: "#{client_class_list}", data: { page: body_data_page, qa_selector: 'login_page' } }
= header_message
+ = render "layouts/init_client_detection_flags"
.page-wrap
= render "layouts/header/empty"
.login-page-broadcast
diff --git a/app/views/layouts/devise_empty.html.haml b/app/views/layouts/devise_empty.html.haml
index 6c9c8aa4431..ff2b00ea376 100644
--- a/app/views/layouts/devise_empty.html.haml
+++ b/app/views/layouts/devise_empty.html.haml
@@ -1,8 +1,9 @@
!!! 5
%html{ lang: "en", class: system_message_class }
= render "layouts/head"
- %body.ui-indigo.login-page.application.navless
+ %body.ui-indigo.login-page.application.navless{ class: "#{client_class_list}" }
= header_message
+ = render "layouts/init_client_detection_flags"
= render "layouts/header/empty"
= render "layouts/broadcast"
.container.navless-container
diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml
index 9e92ced9f89..f76268bc29b 100644
--- a/app/views/layouts/nav/sidebar/_admin.html.haml
+++ b/app/views/layouts/nav/sidebar/_admin.html.haml
@@ -270,7 +270,7 @@
%span
= _('Geo')
= nav_link(path: 'application_settings#preferences') do
- = link_to preferences_admin_application_settings_path, title: _('Preferences') do
+ = link_to preferences_admin_application_settings_path, title: _('Preferences'), data: { qa_selector: 'admin_settings_preferences_link' } do
%span
= _('Preferences')
diff --git a/app/views/peek/_bar.html.haml b/app/views/peek/_bar.html.haml
index 5228930293c..9725f640be9 100644
--- a/app/views/peek/_bar.html.haml
+++ b/app/views/peek/_bar.html.haml
@@ -1,6 +1,6 @@
-- return unless peek_enabled?
+- return unless performance_bar_enabled?
#js-peek{ data: { env: Peek.env,
- request_id: Peek.request_id,
+ request_id: peek_request_id,
peek_url: "#{peek_routes_path}/results" },
class: Peek.env }
diff --git a/app/views/projects/pages/_access.html.haml b/app/views/projects/pages/_access.html.haml
index 73ea30e1d3d..539f223ca9b 100644
--- a/app/views/projects/pages/_access.html.haml
+++ b/app/views/projects/pages/_access.html.haml
@@ -5,9 +5,11 @@
.card-body
%p
%strong
- Congratulations! Your pages are served under:
+ = _("Your pages are served under:")
%p= link_to @project.pages_url, @project.pages_url
- @project.pages_domains.each do |domain|
%p= link_to domain.url, domain.url
+ .card-footer.alert-primary
+ = _("It may take up to 30 minutes before the site is available after the first deployment.")
diff --git a/changelogs/unreleased/60561-quick-action-label-first-for-issue.yml b/changelogs/unreleased/60561-quick-action-label-first-for-issue.yml
new file mode 100644
index 00000000000..c4bcb2b05f3
--- /dev/null
+++ b/changelogs/unreleased/60561-quick-action-label-first-for-issue.yml
@@ -0,0 +1,5 @@
+---
+title: Quick action label must be first in issue comment
+merge_request: 32367
+author: Romain Maneschi
+type: fixed
diff --git a/changelogs/unreleased/65304-add-pages-first-deployment-message.yml b/changelogs/unreleased/65304-add-pages-first-deployment-message.yml
new file mode 100644
index 00000000000..d4c3533acaf
--- /dev/null
+++ b/changelogs/unreleased/65304-add-pages-first-deployment-message.yml
@@ -0,0 +1,5 @@
+---
+title: Add warning about initial deployment delay for GitLab Pages sites
+merge_request: 32122
+author:
+type: added
diff --git a/changelogs/unreleased/65389-wrong-format-on-ms-teams-integration-push-events-with-multi-line-commit-messages.yml b/changelogs/unreleased/65389-wrong-format-on-ms-teams-integration-push-events-with-multi-line-commit-messages.yml
new file mode 100644
index 00000000000..36e1da2c17c
--- /dev/null
+++ b/changelogs/unreleased/65389-wrong-format-on-ms-teams-integration-push-events-with-multi-line-commit-messages.yml
@@ -0,0 +1,5 @@
+---
+title: Wrong format on MS teams integration push events with multi line commit messages
+merge_request: 32180
+author: Massimeddu Cireddu
+type: fixed
diff --git a/changelogs/unreleased/66803-fix-uploads-relative-link-filter.yml b/changelogs/unreleased/66803-fix-uploads-relative-link-filter.yml
new file mode 100644
index 00000000000..523e5c8c545
--- /dev/null
+++ b/changelogs/unreleased/66803-fix-uploads-relative-link-filter.yml
@@ -0,0 +1,5 @@
+---
+title: Fix upload URLs in Markdown for users without access to project repository
+merge_request: 32448
+author:
+type: fixed
diff --git a/changelogs/unreleased/add-warning-note-to-project-container-registry-setting.yml b/changelogs/unreleased/add-warning-note-to-project-container-registry-setting.yml
new file mode 100644
index 00000000000..0663788b680
--- /dev/null
+++ b/changelogs/unreleased/add-warning-note-to-project-container-registry-setting.yml
@@ -0,0 +1,6 @@
+---
+title: Added warning note on the project container registry setting informing users
+ that the registry is public for public projects
+merge_request: 32447
+author:
+type: other
diff --git a/changelogs/unreleased/fix-peek-on-puma.yml b/changelogs/unreleased/fix-peek-on-puma.yml
new file mode 100644
index 00000000000..1071607b628
--- /dev/null
+++ b/changelogs/unreleased/fix-peek-on-puma.yml
@@ -0,0 +1,5 @@
+---
+title: Fix performance bar on Puma
+merge_request: 32213
+author:
+type: fixed
diff --git a/changelogs/unreleased/sh-mermaid-8-2-6.yml b/changelogs/unreleased/sh-mermaid-8-2-6.yml
new file mode 100644
index 00000000000..d5cee250385
--- /dev/null
+++ b/changelogs/unreleased/sh-mermaid-8-2-6.yml
@@ -0,0 +1,5 @@
+---
+title: Update Mermaid to v8.2.6
+merge_request: 32502
+author:
+type: fixed
diff --git a/changelogs/unreleased/swagger-ui-ci-page-template.yml b/changelogs/unreleased/swagger-ui-ci-page-template.yml
new file mode 100644
index 00000000000..6d17baf82c8
--- /dev/null
+++ b/changelogs/unreleased/swagger-ui-ci-page-template.yml
@@ -0,0 +1,5 @@
+---
+title: "Add SwaggerUI Pages template for .gitlab-ci.yml"
+merge_request: 31183
+author: mdhtr
+type: added
diff --git a/doc/administration/geo/replication/updating_the_geo_nodes.md b/doc/administration/geo/replication/updating_the_geo_nodes.md
index 39174780e24..8c27c4dac4f 100644
--- a/doc/administration/geo/replication/updating_the_geo_nodes.md
+++ b/doc/administration/geo/replication/updating_the_geo_nodes.md
@@ -1,15 +1,18 @@
# Updating the Geo nodes **(PREMIUM ONLY)**
-Depending on which version of Geo you are updating to/from, there may be
-different steps.
+Depending on which version of Geo you are updating to/from, there may be different steps.
## General update steps
-In order to update the Geo nodes when a new GitLab version is released,
-all you need to do is update GitLab itself:
+NOTE: **Note:** These general update steps are not intended for [high-availability deployments](https://docs.gitlab.com/omnibus/update/README.html#multi-node--ha-deployment), and will cause downtime. If you want to avoid downtime, consider using [zero downtime updates](https://docs.gitlab.com/omnibus/update/README.html#zero-downtime-updates).
-1. Log into each node (**primary** and **secondary** nodes).
-1. [Update GitLab][update].
+To update the Geo nodes when a new GitLab version is released, update **primary**
+and all **secondary** nodes:
+
+1. Log into the **primary** node.
+1. [Update GitLab on the **primary** node using Omnibus](https://docs.gitlab.com/omnibus/update/README.html).
+1. Log into each **secondary** node.
+1. [Update GitLab on each **secondary** node using Omnibus](https://docs.gitlab.com/omnibus/update/README.html).
1. [Test](#check-status-after-updating) **primary** and **secondary** nodes, and check version in each.
### Check status after updating
@@ -27,6 +30,8 @@ everything is working correctly:
1. Test the data replication by pushing code to the **primary** node and see if it
is received by **secondary** nodes.
+If you encounter any issues, please consult the [Geo troubleshooting guide](troubleshooting.md).
+
## Upgrading to GitLab 12.1
By default, GitLab 12.1 will attempt to automatically upgrade the embedded PostgreSQL server to 10.7 from 9.6. Please see [the omnibus documentation](https://docs.gitlab.com/omnibus/settings/database.html#upgrading-a-geo-instance) for the recommended procedure.
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 10255f768e6..06bd9e68a18 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -100,7 +100,7 @@ The following table lists available parameters for jobs:
| [`stage`](#stage) | Defines a job stage (default: `test`). |
| [`only`](#onlyexcept-basic) | Limit when jobs are created. Also available: [`only:refs`, `only:kubernetes`, `only:variables`, and `only:changes`](#onlyexcept-advanced). |
| [`except`](#onlyexcept-basic) | Limit when jobs are not created. Also available: [`except:refs`, `except:kubernetes`, `except:variables`, and `except:changes`](#onlyexcept-advanced). |
-| [`rules`](#rules) | List of coniditions to evaluate and determine selected attributes of a build and whether or not it is created. May not be used alongside `only`/`except`.
+| [`rules`](#rules) | List of conditions to evaluate and determine selected attributes of a build and whether or not it is created. May not be used alongside `only`/`except`.
| [`tags`](#tags) | List of tags which are used to select Runner. |
| [`allow_failure`](#allow_failure) | Allow job to fail. Failed job doesn't contribute to commit status. |
| [`when`](#when) | When to run job. Also available: `when:manual` and `when:delayed`. |
diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md
index 7832850a9f0..f825b3d7088 100644
--- a/doc/development/contributing/style_guides.md
+++ b/doc/development/contributing/style_guides.md
@@ -25,8 +25,13 @@
1. [Python](../python_guide/index.md)
1. [Shell scripting](../shell_scripting_guide/index.md)
+## Checking the style and other issues
+
This is also the style used by linting tools such as
[RuboCop](https://github.com/rubocop-hq/rubocop) and [Hound CI](https://houndci.com).
+You can run RuboCop by hand or install a tool like [Overcommit](https://github.com/sds/overcommit) to run it for you.
+Overcommit will automatically run the configured checks (like Rubocop) on every modified file before commit. You can use the example overcommit configuration found in `.overcommit.yml.example` as a quickstart.
+This saves you time as you don't have to wait for the same errors to be detected by the CI.
---
diff --git a/doc/development/documentation/index.md b/doc/development/documentation/index.md
index edd83f67d3b..719b9aa212a 100644
--- a/doc/development/documentation/index.md
+++ b/doc/development/documentation/index.md
@@ -4,9 +4,9 @@ description: Learn how to contribute to GitLab Documentation.
# GitLab Documentation guidelines
-GitLab's documentation is [intended as the single source of truth (SSOT)](https://about.gitlab.com/handbook/documentation/) for information about how to configure, use, and troubleshoot GitLab. The documentation contains use cases and usage instructions covering every GitLab feature, organized by product area and subject. This includes topics and workflows that span multiple GitLab features, as well as the use of GitLab with other applications.
+GitLab's documentation is [intended as the single source of truth (SSOT)](https://about.gitlab.com/handbook/documentation/) for information about how to configure, use, and troubleshoot GitLab. The documentation contains use cases and usage instructions for every GitLab feature, organized by product area and subject. This includes topics and workflows that span multiple GitLab features, and the use of GitLab with other applications.
-In addition to this page, the following resources to help craft and contribute documentation are available:
+In addition to this page, the following resources can help you craft and contribute documentation:
- [Style Guide](styleguide.md) - What belongs in the docs, language guidelines, and more.
- [Structure and template](structure.md) - Learn the typical parts of a doc page and how to write each one.
@@ -18,9 +18,9 @@ In addition to this page, the following resources to help craft and contribute d
## Source files and rendered web locations
-Documentation for GitLab Community Edition (CE) and Enterprise Edition (EE), along with GitLab Runner and Omnibus, is published to [docs.gitlab.com](https://docs.gitlab.com). The documentation for CE and EE is also published within the application at `/help` on the domain of the GitLab instance, though there are [plans](https://gitlab.com/groups/gitlab-org/-/epics/693) to end this practice and instead link out from the GitLab application to docs.gitlab.com URLs.
+Documentation for GitLab Community Edition (CE), Enterprise Edition (EE), GitLab Runner, and Omnibus is published to [docs.gitlab.com](https://docs.gitlab.com). Documentation for CE and EE is also published within the application at `/help` on the domain of the GitLab instance.
-At `/help`, only content for your current edition and version is included, whereas multiple versions' content is available at docs.gitlab.com.
+At `/help`, only help for your current edition and version is included. Help for other versions is available at docs.gitlab.com.
The source of the documentation exists within the codebase of each GitLab application in the following repository locations:
@@ -37,9 +37,9 @@ Documentation issues and merge requests are part of their respective repositorie
[Contributions to GitLab docs](workflow.md) are welcome from the entire GitLab community.
-To ensure that GitLab docs keep up with changes to the product, special processes and responsibilities are in place concerning all [feature changes](feature-change-workflow.md)—i.e. development work that impacts the appearance, usage, or administration of a feature.
+To ensure that GitLab docs are current, there are special processes and responsibilities for all [feature changes](feature-change-workflow.md)—i.e. development work that impacts the appearance, usage, or administration of a feature.
-Meanwhile, anyone can contribute [documentation improvements](improvement-workflow.md) large or small that are not associated with a feature change. For example, adding a new doc on how to accomplish a use case that's already possible with GitLab or with third-party tools and GitLab.
+However, anyone can contribute [documentation improvements](improvement-workflow.md) that are not associated with a feature change. For example, adding a new doc on how to accomplish a use case that's already possible with GitLab or with third-party tools and GitLab.
## Markdown and styles
@@ -54,16 +54,14 @@ See the [Structure](styleguide.md#structure) section of the [Documentation Style
## Single codebase
-We currently maintain two sets of docs: one in the
+We maintain two sets of docs: one in the
[gitlab-ce](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc) repo and
one in [gitlab-ee](https://gitlab.com/gitlab-org/gitlab-ee/tree/master/doc).
-They are identical, but they are different repositories. When the
-time comes to have only one codebase for the GitLab project, we'll be ready.
+These are identical, but they are different repositories.
### CE first
-All merge requests for documentation must be submitted to CE, regardless of the content
-it has. This means that:
+All merge requests for documentation must be submitted to CE. This means that:
- For **EE-only docs changes**, you only have to submit an MR in the CE project.
- For **EE-only features** that touch both the code and the docs, you have to submit
@@ -74,20 +72,20 @@ This might seem like a duplicate effort, but it's only for the short term.
Since the CE and EE docs are combined, it's crucial to add the relevant
[product badges](styleguide.md#product-badges) for all EE documentation, so that
-we can discern which features belong to which tier.
+we can determine which features belong to which tier.
### EE specific lines check
There's a special test in place
([`ee_specific_check.rb`](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/scripts/ee_specific_check/ee_specific_check.rb)),
-which, among others, checks and prevents creating/editing new files and directories
+which checks and prevents creating or editing new files or directories
in EE under `doc/`. This should fail when changes to anything in `/doc` are submitted
in an EE MR. To pass the test, simply remove the docs changes from the EE MR, and
[submit them in CE](#ce-first).
## Changing document location
-Changing a document's location requires specific steps to be followed to ensure that
+Changing a document's location requires specific steps to ensure that
users can seamlessly access the new doc page, whether they are accessing content
on a GitLab instance domain at `/help` or at docs.gitlab.com. Be sure to ping a
GitLab technical writer if you have any questions during the process (such as
@@ -95,7 +93,7 @@ whether the move is necessary), and ensure that a technical writer reviews this
change prior to merging.
If you indeed need to change a document's location, do not remove the old
-document, but rather replace all of its content with a new line:
+document, but instead replace all of its content with a new line:
```md
This document was moved to [another location](path/to/new_doc.md).
@@ -105,7 +103,7 @@ where `path/to/new_doc.md` is the relative path to the root directory `doc/`.
---
-For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to
+For example, if you move `doc/workflow/lfs/lfs_administration.md` to
`doc/administration/lfs.md`, then the steps would be:
1. Copy `doc/workflow/lfs/lfs_administration.md` to `doc/administration/lfs.md`
@@ -145,7 +143,7 @@ Things to note:
### Alternative redirection method
-Alternatively to the method described above, you can simply replace the content
+You can also replace the content
of the old file with a frontmatter containing a redirect link:
```yaml
@@ -163,7 +161,7 @@ land on the doc via `/help`.
### Redirections for pages with Disqus comments
-If the documentation page being relocated already has any Disqus comments,
+If the documentation page being relocated already has Disqus comments,
we need to preserve the Disqus thread.
Disqus uses an identifier per page, and for docs.gitlab.com, the page identifier
@@ -189,8 +187,7 @@ even if it's `index.html` or `README.html`.
## Branch naming
If your contribution contains **only** documentation changes, you can speed up
-the CI process by following some branch naming conventions. You have three
-choices:
+the CI process by following these branch naming conventions:
| Branch name | Valid example |
|:----------------------|:-----------------------------|
@@ -199,7 +196,7 @@ choices:
| Ending in `-docs` | `123-update-api-issues-docs` |
If your branch name matches any of the above, it will run only the docs
-tests. If it does not, the whole application test suite will run (including docs tests).
+tests. If not, the whole application test suite will run (including docs tests).
## Merge requests for GitLab documentation
@@ -399,8 +396,8 @@ preview the changes. The docs URL can be found in two places:
triggered pipeline so that you can investigate whether something went wrong
TIP: **Tip:**
-Someone that has no merge rights to the CE/EE projects (think of forks from
-contributors) will not be able to run the manual job. In that case, you can
+Someone with no merge rights to the CE/EE projects (think of forks from
+contributors) cannot run the manual job. In that case, you can
ask someone from the GitLab team who has the permissions to do that for you.
NOTE: **Note:**
@@ -458,8 +455,8 @@ The following GitLab features are used among others:
## Testing
-We treat documentation as code, thus have implemented some testing.
-Currently, the following tests are in place:
+We treat documentation as code, and so use tests to maintain the standards and quality of the docs.
+The current tests are:
1. `docs lint`: Check that all internal (relative) links work correctly and
that all cURL examples in API docs use the full switches. It's recommended
@@ -484,7 +481,7 @@ Currently, the following tests are in place:
### Linting
-To help adhere to the [documentation style guidelines](styleguide.md), and to improve the content
+To help adhere to the [documentation style guidelines](styleguide.md), and improve the content
added to documentation, consider locally installing and running documentation linters. This will
help you catch common issues before raising merge requests for review of documentation.
diff --git a/doc/integration/elasticsearch.md b/doc/integration/elasticsearch.md
index dc4aa9a5373..c8c1bb00d83 100644
--- a/doc/integration/elasticsearch.md
+++ b/doc/integration/elasticsearch.md
@@ -92,10 +92,11 @@ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
To build and install the indexer, run:
```sh
-git clone https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer.git
-cd gitlab-elasticsearch-indexer
-make
-sudo make install
+indexer_path=/home/git/gitlab-elasticsearch-indexer
+
+# Run the installation task for gitlab-elasticsearch-indexer:
+sudo -u git -H bundle exec rake gitlab:indexer:install[$indexer_path] RAILS_ENV=production
+cd $indexer_path && sudo make install
```
The `gitlab-elasticsearch-indexer` will be installed to `/usr/local/bin`.
diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md
index 3eead6ccd3f..5e7bc4142fb 100644
--- a/doc/user/application_security/sast/index.md
+++ b/doc/user/application_security/sast/index.md
@@ -125,6 +125,21 @@ variables:
Because the template is [evaluated before](../../../ci/yaml/README.md#include)
the pipeline configuration, the last mention of the variable will take precedence.
+#### Using a variable to pass username and password to a private Maven repository
+
+If you have a private Apache Maven repository that requires login credentials,
+you can use the `MAVEN_CLI_OPTS` [environment variable](#available-variables)
+to pass a username and password. You can set it under your project's settings
+so that your credentials aren't exposed in `.gitlab-ci.yml`.
+
+If the username is `myuser` and the password is `verysecret` then you would
+set the following [variable](../../../ci/variables/README.md#via-the-ui)
+under your project's settings:
+
+| Type | Key | Value |
+| ---- | --- | ----- |
+| Variable | `MAVEN_CLI_OPTS` | `-Drepository.password=verysecret -Drepository.user=myuser` |
+
### Overriding the SAST template
If you want to override the job definition (for example, change properties like
diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md
index ffd9bc04c3e..16fd0149101 100644
--- a/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md
+++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md
@@ -22,7 +22,8 @@ See all the related issues linked from this [issue's description](https://gitlab
for more information.
Note: **Note:**
-Using this feature requires **2 IP addresses** to be configured to the machine.
+Using this feature requires two separate IP addresses, one for the GitLab domain
+and one GitLab Pages domain.
## Requirements
diff --git a/lib/banzai/filter/relative_link_filter.rb b/lib/banzai/filter/relative_link_filter.rb
index 846a7d46aad..2b734db5cfb 100644
--- a/lib/banzai/filter/relative_link_filter.rb
+++ b/lib/banzai/filter/relative_link_filter.rb
@@ -19,7 +19,6 @@ module Banzai
def call
return doc if context[:system_note]
- return doc unless visible_to_user?
@uri_types = {}
clear_memoization(:linkable_files)
@@ -50,7 +49,7 @@ module Banzai
if html_attr.value.start_with?('/uploads/')
process_link_to_upload_attr(html_attr)
- elsif linkable_files?
+ elsif linkable_files? && repo_visible_to_user?
process_link_to_repository_attr(html_attr)
end
end
@@ -168,14 +167,8 @@ module Banzai
Gitlab.config.gitlab.relative_url_root.presence || '/'
end
- def visible_to_user?
- if project
- Ability.allowed?(current_user, :download_code, project)
- elsif group
- Ability.allowed?(current_user, :read_group, group)
- else # Objects detached from projects or groups, e.g. Personal Snippets.
- true
- end
+ def repo_visible_to_user?
+ project && Ability.allowed?(current_user, :download_code, project)
end
def ref
diff --git a/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml b/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml
new file mode 100644
index 00000000000..8fd08ea7995
--- /dev/null
+++ b/lib/gitlab/ci/templates/Pages/SwaggerUI.gitlab-ci.yml
@@ -0,0 +1,29 @@
+image: node:10-alpine
+
+# specify the location of the Open API Specification files within your project
+# and the filename of the specification that you would like to display by default
+variables:
+ DOCS_FOLDER: "api-docs"
+ SPEC_TO_DISPLAY: "my-project_specification_0.0.1.json"
+
+# These folders are cached between builds
+cache:
+ paths:
+ - ./node_modules
+
+# publishes all files from the $DOCS_FOLDER together with the static version of SwaggerUI
+# sets the specification file named in $SPEC_TO_DISPLAY to be displayed by default
+pages:
+ stage: deploy
+ before_script:
+ - npm install swagger-ui-dist@3.22.1
+ script:
+ - mkdir public
+ - cp -rp node_modules/swagger-ui-dist/* public
+ - cp -rp $DOCS_FOLDER/* public
+ - sed -i "s#https://petstore\.swagger\.io/v2/swagger\.json#$SPEC_TO_DISPLAY#g" public/index.html
+ artifacts:
+ paths:
+ - public
+ only:
+ - master
diff --git a/lib/gitlab/diff/suggestion.rb b/lib/gitlab/diff/suggestion.rb
index 4a3ac2106e2..b669e785721 100644
--- a/lib/gitlab/diff/suggestion.rb
+++ b/lib/gitlab/diff/suggestion.rb
@@ -46,7 +46,7 @@ module Gitlab
private
def line_break_chars(line)
- match = /\r\n|\r|\n/.match(line)
+ match = Gitlab::Regex.breakline_regex.match(line)
match[0] if match
end
end
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index d65c0d3e78d..2ac99b1ff02 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -157,7 +157,7 @@ module Gitlab
# Keep track, separately, for the performance bar
self.query_time += duration
- if peek_enabled?
+ if Gitlab::PerformanceBar.enabled_for_request?
add_call_details(feature: "#{service}##{rpc}", duration: duration, request: request_hash, rpc: rpc,
backtrace: Gitlab::Profiler.clean_backtrace(caller))
end
@@ -335,17 +335,13 @@ module Gitlab
Gitlab::SafeRequestStore["gitaly_call_permitted"] = 0
end
- def self.peek_enabled?
- Gitlab::SafeRequestStore[:peek_enabled]
- end
-
def self.add_call_details(details)
Gitlab::SafeRequestStore['gitaly_call_details'] ||= []
Gitlab::SafeRequestStore['gitaly_call_details'] << details
end
def self.list_call_details
- return [] unless peek_enabled?
+ return [] unless Gitlab::PerformanceBar.enabled_for_request?
Gitlab::SafeRequestStore['gitaly_call_details'] || []
end
diff --git a/lib/gitlab/performance_bar.rb b/lib/gitlab/performance_bar.rb
index 07439d8e011..68af290d069 100644
--- a/lib/gitlab/performance_bar.rb
+++ b/lib/gitlab/performance_bar.rb
@@ -6,7 +6,11 @@ module Gitlab
EXPIRY_TIME_L1_CACHE = 1.minute
EXPIRY_TIME_L2_CACHE = 5.minutes
- def self.enabled?(user = nil)
+ def self.enabled_for_request?
+ Gitlab::SafeRequestStore[:peek_enabled]
+ end
+
+ def self.enabled_for_user?(user = nil)
return true if Rails.env.development?
return true if user&.admin?
return false unless user && allowed_group_id
diff --git a/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb b/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
index 2d997760c46..cddd4f18cc3 100644
--- a/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
+++ b/lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
@@ -4,8 +4,8 @@
module Gitlab
module PerformanceBar
module RedisAdapterWhenPeekEnabled
- def save
- super unless ::Peek.request_id.blank?
+ def save(request_id)
+ super if ::Gitlab::PerformanceBar.enabled_for_request? && request_id.present?
end
end
end
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index e6372a42dda..6636ffa448e 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -115,5 +115,9 @@ module Gitlab
def jira_transition_id_regex
@jira_transition_id_regex ||= /\d+/
end
+
+ def breakline_regex
+ @breakline_regex ||= /\r\n|\r|\n/
+ end
end
end
diff --git a/lib/gitlab/rugged_instrumentation.rb b/lib/gitlab/rugged_instrumentation.rb
index 8bb8c547ae1..c2b55431547 100644
--- a/lib/gitlab/rugged_instrumentation.rb
+++ b/lib/gitlab/rugged_instrumentation.rb
@@ -27,19 +27,15 @@ module Gitlab
SafeRequestStore.active?
end
- def self.peek_enabled?
- SafeRequestStore[:peek_enabled]
- end
-
def self.add_call_details(details)
- return unless peek_enabled?
+ return unless Gitlab::PerformanceBar.enabled_for_request?
Gitlab::SafeRequestStore[:rugged_call_details] ||= []
Gitlab::SafeRequestStore[:rugged_call_details] << details
end
def self.list_call_details
- return [] unless peek_enabled?
+ return [] unless Gitlab::PerformanceBar.enabled_for_request?
Gitlab::SafeRequestStore[:rugged_call_details] || []
end
diff --git a/lib/gitlab/slash_commands/presenters/help.rb b/lib/gitlab/slash_commands/presenters/help.rb
index 5421b0b9a84..342dae456a8 100644
--- a/lib/gitlab/slash_commands/presenters/help.rb
+++ b/lib/gitlab/slash_commands/presenters/help.rb
@@ -43,16 +43,24 @@ module Gitlab
end
def help_footer
+ message = @project ? project_info : ''
+ message += <<~MESSAGE
+ *Documentation*
+
+ For more information about GitLab chatops, refer to its
+ documentation: https://docs.gitlab.com/ce/ci/chatops/README.html.
+ MESSAGE
+
+ message
+ end
+
+ def project_info
<<~MESSAGE
*Project*
The GitLab project for this chatops integration can be found at
#{url_for(@project)}.
- *Documentation*
-
- For more information about GitLab chatops, refer to its
- documentation: https://docs.gitlab.com/ce/ci/chatops/README.html.
MESSAGE
end
diff --git a/lib/peek/views/active_record.rb b/lib/peek/views/active_record.rb
index a35783c1971..bbc9f11e90f 100644
--- a/lib/peek/views/active_record.rb
+++ b/lib/peek/views/active_record.rb
@@ -27,7 +27,7 @@ module Peek
super
subscribe('sql.active_record') do |_, start, finish, _, data|
- if Gitlab::SafeRequestStore.store[:peek_enabled]
+ if Gitlab::PerformanceBar.enabled_for_request?
unless data[:cached]
detail_store << {
duration: finish - start,
diff --git a/lib/peek/views/redis_detailed.rb b/lib/peek/views/redis_detailed.rb
index f36f581d5e9..84041b6be73 100644
--- a/lib/peek/views/redis_detailed.rb
+++ b/lib/peek/views/redis_detailed.rb
@@ -16,7 +16,7 @@ module Gitlab
private
def add_call_details(duration, args)
- return unless peek_enabled?
+ return unless Gitlab::PerformanceBar.enabled_for_request?
# redis-rb passes an array (e.g. [:get, key])
return unless args.length == 1
@@ -27,10 +27,6 @@ module Gitlab
}
end
- def peek_enabled?
- Gitlab::SafeRequestStore.store[:peek_enabled]
- end
-
def detail_store
::Gitlab::SafeRequestStore['redis_call_details'] ||= []
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 7807d5db6e7..e91061e74c2 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -6257,6 +6257,9 @@ msgstr ""
msgid "Issues, merge requests, pushes, and comments."
msgstr ""
+msgid "It may take up to 30 minutes before the site is available after the first deployment."
+msgstr ""
+
msgid "It must have a header row and at least two columns: the first column is the issue title and the second column is the issue description. The separator is automatically detected."
msgstr ""
@@ -7643,6 +7646,9 @@ msgstr ""
msgid "Note: Consider asking your GitLab administrator to configure %{github_integration_link}, which will allow login via GitHub and allow importing repositories without generating a Personal Access Token."
msgstr ""
+msgid "Note: the container registry is always visible when a project is public"
+msgstr ""
+
msgid "NoteForm|Note"
msgstr ""
@@ -13611,6 +13617,9 @@ msgstr ""
msgid "Your new personal access token has been created."
msgstr ""
+msgid "Your pages are served under:"
+msgstr ""
+
msgid "Your password reset token has expired."
msgstr ""
diff --git a/package.json b/package.json
index 3d9e0838893..4244dc2d52b 100644
--- a/package.json
+++ b/package.json
@@ -96,7 +96,7 @@
"jszip-utils": "^0.0.2",
"katex": "^0.10.0",
"marked": "^0.3.12",
- "mermaid": "^8.2.4",
+ "mermaid": "^8.2.6",
"monaco-editor": "^0.15.6",
"monaco-editor-webpack-plugin": "^1.7.0",
"mousetrap": "^1.4.6",
diff --git a/qa/qa/page/admin/menu.rb b/qa/qa/page/admin/menu.rb
index 7c214da8486..5a18ebd7af8 100644
--- a/qa/qa/page/admin/menu.rb
+++ b/qa/qa/page/admin/menu.rb
@@ -11,12 +11,21 @@ module QA
element :admin_settings_repository_item
element :admin_settings_general_item
element :admin_settings_metrics_and_profiling_item
+ element :admin_settings_preferences_link
end
view 'app/views/layouts/nav/sidebar/_admin.html.haml' do
element :integration_settings_link
end
+ def go_to_preferences_settings
+ hover_settings do
+ within_submenu do
+ click_element :admin_settings_preferences_link
+ end
+ end
+ end
+
def go_to_repository_settings
hover_settings do
within_submenu do
diff --git a/qa/qa/page/settings/common.rb b/qa/qa/page/settings/common.rb
index bede3fde105..2d7b41c76e1 100644
--- a/qa/qa/page/settings/common.rb
+++ b/qa/qa/page/settings/common.rb
@@ -11,7 +11,7 @@ module QA
within_element(element_name) do
# Because it is possible to click the button before the JS toggle code is bound
wait(reload: false) do
- click_button 'Expand' unless has_css?('button', text: 'Collapse')
+ click_button 'Expand' unless has_css?('button', text: 'Collapse', wait: 1)
has_content?('Collapse')
end
diff --git a/spec/features/issues/user_comments_on_issue_spec.rb b/spec/features/issues/user_comments_on_issue_spec.rb
index bdaaea5bf7f..829f945c47f 100644
--- a/spec/features/issues/user_comments_on_issue_spec.rb
+++ b/spec/features/issues/user_comments_on_issue_spec.rb
@@ -55,6 +55,23 @@ describe "User comments on issue", :js do
expect(page.find('svg.mermaid')).to have_content escaped_content
end
+
+ it 'opens autocomplete menu for quick actions and have `/label` first choice' do
+ project.add_maintainer(user)
+ create(:label, project: project, title: 'label')
+
+ page.within '.timeline-content-form' do
+ find('#note-body').native.send_keys('/l')
+ end
+
+ wait_for_requests
+
+ expect(page).to have_selector('.atwho-container')
+
+ page.within '.atwho-container #at-view-commands' do
+ expect(find('li', match: :first)).to have_content('/label')
+ end
+ end
end
context "when editing comments" do
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb
index c4b3ddb2088..d55e9d12801 100644
--- a/spec/features/projects/pages_spec.rb
+++ b/spec/features/projects/pages_spec.rb
@@ -30,6 +30,12 @@ shared_examples 'pages settings editing' do
expect(page).to have_content('Access pages')
end
+ it 'renders first deployment warning' do
+ visit project_pages_path(project)
+
+ expect(page).to have_content('It may take up to 30 minutes before the site is available after the first deployment.')
+ end
+
context 'when support for external domains is disabled' do
it 'renders message that support is disabled' do
visit project_pages_path(project)
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb
index 8e4db2ca840..d1f3b3f4076 100644
--- a/spec/features/users/login_spec.rb
+++ b/spec/features/users/login_spec.rb
@@ -624,6 +624,14 @@ describe 'Login' do
end
end
+ describe 'Client helper classes and flags' do
+ it 'adds client browser and platform classes to page body' do
+ visit root_path
+ expect(find('body')[:class]).to include('gl-browser-generic')
+ expect(find('body')[:class]).to include('gl-platform-other')
+ end
+ end
+
context 'when terms are enforced' do
let(:user) { create(:user) }
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index 1757ec8fa4d..f6e1720e113 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -65,9 +65,6 @@ describe MarkupHelper do
describe 'inside a group' do
before do
- # Ensure the generated reference links aren't redacted
- group.add_maintainer(user)
-
helper.instance_variable_set(:@group, group)
helper.instance_variable_set(:@project, nil)
end
@@ -81,9 +78,6 @@ describe MarkupHelper do
let(:project_in_group) { create(:project, group: group) }
before do
- # Ensure the generated reference links aren't redacted
- project_in_group.add_maintainer(user)
-
helper.instance_variable_set(:@group, group)
helper.instance_variable_set(:@project, project_in_group)
end
diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb
index 789530fbc56..f8b3748c663 100644
--- a/spec/lib/banzai/filter/relative_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb
@@ -289,121 +289,72 @@ describe Banzai::Filter::RelativeLinkFilter do
let(:relative_path) { "/#{project.full_path}#{upload_path}" }
context 'to a project upload' do
- context 'without project repository access' do
- let(:project) { create(:project, :repository, repository_access_level: ProjectFeature::PRIVATE) }
-
- it 'does not rebuild relative URL for a link' do
- doc = filter(link(upload_path))
- expect(doc.at_css('a')['href']).to eq(upload_path)
-
- doc = filter(nested(link(upload_path)))
- expect(doc.at_css('a')['href']).to eq(upload_path)
- end
-
- it 'does not rebuild relative URL for an image' do
- doc = filter(image(upload_path))
- expect(doc.at_css('img')['src']).to eq(upload_path)
-
- doc = filter(nested(image(upload_path)))
- expect(doc.at_css('img')['src']).to eq(upload_path)
- end
-
+ shared_examples 'rewrite project uploads' do
context 'with an absolute URL' do
let(:absolute_path) { Gitlab.config.gitlab.url + relative_path }
let(:only_path) { false }
- it 'does not rewrite the link' do
+ it 'rewrites the link correctly' do
doc = filter(link(upload_path))
- expect(doc.at_css('a')['href']).to eq(upload_path)
+ expect(doc.at_css('a')['href']).to eq(absolute_path)
end
end
- end
- context 'with an absolute URL' do
- let(:absolute_path) { Gitlab.config.gitlab.url + relative_path }
- let(:only_path) { false }
-
- it 'rewrites the link correctly' do
+ it 'rebuilds relative URL for a link' do
doc = filter(link(upload_path))
+ expect(doc.at_css('a')['href']).to eq(relative_path)
- expect(doc.at_css('a')['href']).to eq(absolute_path)
+ doc = filter(nested(link(upload_path)))
+ expect(doc.at_css('a')['href']).to eq(relative_path)
end
- end
- it 'rebuilds relative URL for a link' do
- doc = filter(link(upload_path))
- expect(doc.at_css('a')['href']).to eq(relative_path)
+ it 'rebuilds relative URL for an image' do
+ doc = filter(image(upload_path))
+ expect(doc.at_css('img')['src']).to eq(relative_path)
- doc = filter(nested(link(upload_path)))
- expect(doc.at_css('a')['href']).to eq(relative_path)
- end
+ doc = filter(nested(image(upload_path)))
+ expect(doc.at_css('img')['src']).to eq(relative_path)
+ end
- it 'rebuilds relative URL for an image' do
- doc = filter(image(upload_path))
- expect(doc.at_css('img')['src']).to eq(relative_path)
+ it 'does not modify absolute URL' do
+ doc = filter(link('http://example.com'))
+ expect(doc.at_css('a')['href']).to eq 'http://example.com'
+ end
- doc = filter(nested(image(upload_path)))
- expect(doc.at_css('img')['src']).to eq(relative_path)
- end
+ it 'supports unescaped Unicode filenames' do
+ path = '/uploads/한글.png'
+ doc = filter(link(path))
- it 'does not modify absolute URL' do
- doc = filter(link('http://example.com'))
- expect(doc.at_css('a')['href']).to eq 'http://example.com'
- end
+ expect(doc.at_css('a')['href']).to eq("/#{project.full_path}/uploads/%ED%95%9C%EA%B8%80.png")
+ end
- it 'supports unescaped Unicode filenames' do
- path = '/uploads/한글.png'
- doc = filter(link(path))
+ it 'supports escaped Unicode filenames' do
+ path = '/uploads/한글.png'
+ escaped = Addressable::URI.escape(path)
+ doc = filter(image(escaped))
- expect(doc.at_css('a')['href']).to eq("/#{project.full_path}/uploads/%ED%95%9C%EA%B8%80.png")
+ expect(doc.at_css('img')['src']).to eq("/#{project.full_path}/uploads/%ED%95%9C%EA%B8%80.png")
+ end
end
- it 'supports escaped Unicode filenames' do
- path = '/uploads/한글.png'
- escaped = Addressable::URI.escape(path)
- doc = filter(image(escaped))
+ context 'without project repository access' do
+ let(:project) { create(:project, :repository, repository_access_level: ProjectFeature::PRIVATE) }
+
+ it_behaves_like 'rewrite project uploads'
+ end
- expect(doc.at_css('img')['src']).to eq("/#{project.full_path}/uploads/%ED%95%9C%EA%B8%80.png")
+ context 'with project repository access' do
+ it_behaves_like 'rewrite project uploads'
end
end
context 'to a group upload' do
- let(:upload_path) { '/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg' }
- let(:upload_link) { link(upload_path) }
+ let(:upload_link) { link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg') }
let(:group) { create(:group) }
let(:project) { nil }
let(:relative_path) { "/groups/#{group.full_path}/-/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" }
- context 'without group read access' do
- let(:group) { create(:group, :private) }
-
- it 'does not rewrite the link' do
- doc = filter(upload_link)
-
- expect(doc.at_css('a')['href']).to eq(upload_path)
- end
-
- it 'does not rewrite the link for subgroup' do
- group.update!(parent: create(:group))
-
- doc = filter(upload_link)
-
- expect(doc.at_css('a')['href']).to eq(upload_path)
- end
-
- context 'with an absolute URL' do
- let(:absolute_path) { Gitlab.config.gitlab.url + relative_path }
- let(:only_path) { false }
-
- it 'does not rewrite the link' do
- doc = filter(upload_link)
-
- expect(doc.at_css('a')['href']).to eq(upload_path)
- end
- end
- end
-
context 'with an absolute URL' do
let(:absolute_path) { Gitlab.config.gitlab.url + relative_path }
let(:only_path) { false }
diff --git a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
index 1a4168f7317..474240cf620 100644
--- a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
+++ b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb
@@ -35,7 +35,7 @@ describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do
let(:args) { ['refs/heads/master', 1] }
before do
- allow(Gitlab::RuggedInstrumentation).to receive(:peek_enabled?).and_return(true)
+ allow(Gitlab::PerformanceBar).to receive(:enabled_for_request?).and_return(true)
end
it 'instruments Rugged call' do
diff --git a/spec/lib/gitlab/performance_bar_spec.rb b/spec/lib/gitlab/performance_bar_spec.rb
index 8d8ac2aebbe..816db49d94a 100644
--- a/spec/lib/gitlab/performance_bar_spec.rb
+++ b/spec/lib/gitlab/performance_bar_spec.rb
@@ -6,14 +6,14 @@ describe Gitlab::PerformanceBar do
shared_examples 'allowed user IDs are cached' do
before do
# Warm the caches
- described_class.enabled?(user)
+ described_class.enabled_for_user?(user)
end
it 'caches the allowed user IDs in cache', :use_clean_rails_memory_store_caching do
expect do
expect(described_class.l1_cache_backend).to receive(:fetch).and_call_original
expect(described_class.l2_cache_backend).not_to receive(:fetch)
- expect(described_class.enabled?(user)).to be_truthy
+ expect(described_class.enabled_for_user?(user)).to be_truthy
end.not_to exceed_query_limit(0)
end
@@ -22,7 +22,7 @@ describe Gitlab::PerformanceBar do
expect do
expect(described_class.l1_cache_backend).to receive(:fetch).and_call_original
expect(described_class.l2_cache_backend).to receive(:fetch).and_call_original
- expect(described_class.enabled?(user)).to be_truthy
+ expect(described_class.enabled_for_user?(user)).to be_truthy
end.not_to exceed_query_limit(0)
end
end
@@ -32,7 +32,7 @@ describe Gitlab::PerformanceBar do
expect do
expect(described_class.l1_cache_backend).to receive(:fetch).and_call_original
expect(described_class.l2_cache_backend).to receive(:fetch).and_call_original
- expect(described_class.enabled?(user)).to be_truthy
+ expect(described_class.enabled_for_user?(user)).to be_truthy
end.not_to exceed_query_limit(2)
end
end
@@ -41,7 +41,7 @@ describe Gitlab::PerformanceBar do
it { expect(described_class.l1_cache_backend).to eq(Gitlab::ThreadMemoryCache.cache_backend) }
it { expect(described_class.l2_cache_backend).to eq(Rails.cache) }
- describe '.enabled?' do
+ describe '.enabled_for_user?' do
let(:user) { create(:user) }
before do
@@ -49,24 +49,24 @@ describe Gitlab::PerformanceBar do
end
it 'returns false when given user is nil' do
- expect(described_class.enabled?(nil)).to be_falsy
+ expect(described_class.enabled_for_user?(nil)).to be_falsy
end
it 'returns true when given user is an admin' do
user = build_stubbed(:user, :admin)
- expect(described_class.enabled?(user)).to be_truthy
+ expect(described_class.enabled_for_user?(user)).to be_truthy
end
it 'returns false when allowed_group_id is nil' do
expect(described_class).to receive(:allowed_group_id).and_return(nil)
- expect(described_class.enabled?(user)).to be_falsy
+ expect(described_class.enabled_for_user?(user)).to be_falsy
end
context 'when allowed group ID does not exist' do
it 'returns false' do
- expect(described_class.enabled?(user)).to be_falsy
+ expect(described_class.enabled_for_user?(user)).to be_falsy
end
end
@@ -79,7 +79,7 @@ describe Gitlab::PerformanceBar do
context 'when user is not a member of the allowed group' do
it 'returns false' do
- expect(described_class.enabled?(user)).to be_falsy
+ expect(described_class.enabled_for_user?(user)).to be_falsy
end
it_behaves_like 'allowed user IDs are cached'
@@ -91,7 +91,7 @@ describe Gitlab::PerformanceBar do
end
it 'returns true' do
- expect(described_class.enabled?(user)).to be_truthy
+ expect(described_class.enabled_for_user?(user)).to be_truthy
end
it_behaves_like 'allowed user IDs are cached'
@@ -108,7 +108,7 @@ describe Gitlab::PerformanceBar do
end
it 'returns the nested group' do
- expect(described_class.enabled?(user)).to be_truthy
+ expect(described_class.enabled_for_user?(user)).to be_truthy
end
end
@@ -118,7 +118,7 @@ describe Gitlab::PerformanceBar do
end
it 'returns false' do
- expect(described_class.enabled?(user)).to be_falsy
+ expect(described_class.enabled_for_user?(user)).to be_falsy
end
end
end
diff --git a/spec/lib/peek/views/rugged_spec.rb b/spec/lib/peek/views/rugged_spec.rb
index d07d6b51a1f..b9507f772d2 100644
--- a/spec/lib/peek/views/rugged_spec.rb
+++ b/spec/lib/peek/views/rugged_spec.rb
@@ -8,7 +8,7 @@ describe Peek::Views::Rugged, :request_store do
let(:project) { create(:project) }
before do
- allow(Gitlab::RuggedInstrumentation).to receive(:peek_enabled?).and_return(true)
+ allow(Gitlab::PerformanceBar).to receive(:enabled_for_request?).and_return(true)
end
it 'returns no results' do
diff --git a/spec/models/project_services/chat_message/push_message_spec.rb b/spec/models/project_services/chat_message/push_message_spec.rb
index a89645a3ea8..2bde0b93fda 100644
--- a/spec/models/project_services/chat_message/push_message_spec.rb
+++ b/spec/models/project_services/chat_message/push_message_spec.rb
@@ -23,7 +23,7 @@ describe ChatMessage::PushMessage do
before do
args[:commits] = [
{ message: 'message1', url: 'http://url1.com', id: 'abcdefghijkl', author: { name: 'author1' } },
- { message: 'message2', url: 'http://url2.com', id: '123456789012', author: { name: 'author2' } }
+ { message: "message2\nsecondline", url: 'http://url2.com', id: '123456789012', author: { name: 'author2' } }
]
end
@@ -34,7 +34,7 @@ describe ChatMessage::PushMessage do
'<http://url.com|project_name> (<http://url.com/compare/before...after|Compare changes>)')
expect(subject.attachments).to eq([{
text: "<http://url1.com|abcdefgh>: message1 - author1\n\n"\
- "<http://url2.com|12345678>: message2 - author2",
+ "<http://url2.com|12345678>: message2\nsecondline - author2",
color: color
}])
end
@@ -49,7 +49,27 @@ describe ChatMessage::PushMessage do
expect(subject.pretext).to eq(
'test.user pushed to branch [master](http://url.com/commits/master) of [project_name](http://url.com) ([Compare changes](http://url.com/compare/before...after))')
expect(subject.attachments).to eq(
- "[abcdefgh](http://url1.com): message1 - author1\n\n[12345678](http://url2.com): message2 - author2")
+ "[abcdefgh](http://url1.com): message1 - author1\n\n[12345678](http://url2.com): message2\nsecondline - author2")
+ expect(subject.activity).to eq(
+ title: 'test.user pushed to branch [master](http://url.com/commits/master)',
+ subtitle: 'in [project_name](http://url.com)',
+ text: '[Compare changes](http://url.com/compare/before...after)',
+ image: 'http://someavatar.com'
+ )
+ end
+ end
+
+ context 'with markdown and commit message html' do
+ before do
+ args[:commit_message_html] = true
+ args[:markdown] = true
+ end
+
+ it 'returns a message regarding pushes' do
+ expect(subject.pretext).to eq(
+ 'test.user pushed to branch [master](http://url.com/commits/master) of [project_name](http://url.com) ([Compare changes](http://url.com/compare/before...after))')
+ expect(subject.attachments).to eq(
+ "[abcdefgh](http://url1.com): message1 - author1<br/>\n<br/>\n[12345678](http://url2.com): message2<br/>\nsecondline - author2")
expect(subject.activity).to eq(
title: 'test.user pushed to branch [master](http://url.com/commits/master)',
subtitle: 'in [project_name](http://url.com)',
diff --git a/spec/support/issuables_requiring_filter_shared_examples.rb b/spec/support/shared_examples/controllers/issuables_requiring_filter_shared_examples.rb
index ee25df00dfb..ee25df00dfb 100644
--- a/spec/support/issuables_requiring_filter_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/issuables_requiring_filter_shared_examples.rb
diff --git a/spec/support/active_record_enum.rb b/spec/support/shared_examples/models/active_record_enum_shared_examples.rb
index fb1189c7f17..fb1189c7f17 100644
--- a/spec/support/active_record_enum.rb
+++ b/spec/support/shared_examples/models/active_record_enum_shared_examples.rb
diff --git a/yarn.lock b/yarn.lock
index 6ab2aa24685..4cf3a9584f1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8116,10 +8116,10 @@ merge2@^1.2.3:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==
-mermaid@^8.2.4:
- version "8.2.4"
- resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-8.2.4.tgz#52bcd45611fd8552ab9ac4e385d2766a0e38dcf7"
- integrity sha512-2la1eJhu4n+Uug4zbxFnkETFDJ9U32OY/fRP8g8A1DrRdfT3Er+7CuUSvxfhIDxl+AxSEU4dXdqCiToZAVMCmQ==
+mermaid@^8.2.6:
+ version "8.2.6"
+ resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-8.2.6.tgz#e73f396461a435c39a998819171c2114f59e46e1"
+ integrity sha512-A8y4zW2aXPj8Yw+BkrCkV6fvzhsFWVESV1IkzRjqQ6T/+tzhkz946+bdebCmHqicEJGTncu/U6h8dgjo5pWo6Q==
dependencies:
"@braintree/sanitize-url" "^3.1.0"
d3 "^5.7.0"