Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/content_editor/services/upload_helpers.js25
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue12
-rw-r--r--app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js6
-rw-r--r--app/controllers/sent_notifications_controller.rb19
-rw-r--r--app/graphql/mutations/work_items/update_task.rb70
-rw-r--r--app/graphql/types/mutation_type.rb1
-rw-r--r--app/graphql/types/work_items/updated_task_input_type.rb11
-rw-r--r--app/mailers/emails/service_desk.rb14
-rw-r--r--app/mailers/previews/notify_preview.rb3
-rw-r--r--app/models/sent_notification.rb1
-rw-r--r--app/models/work_items/widgets/base.rb8
-rw-r--r--app/models/work_items/widgets/hierarchy.rb14
-rw-r--r--app/models/work_items/widgets/labels.rb4
-rw-r--r--app/policies/group_policy.rb1
-rw-r--r--app/services/click_house/sync_strategies/base_sync_strategy.rb2
-rw-r--r--app/services/issuable_base_service.rb5
-rw-r--r--app/services/namespace_settings/update_service.rb4
-rw-r--r--app/services/notification_service.rb10
-rw-r--r--app/services/work_items/create_service.rb15
-rw-r--r--app/services/work_items/widgets/labels_service/base_service.rb25
-rw-r--r--app/services/work_items/widgets/labels_service/create_service.rb18
-rw-r--r--app/services/work_items/widgets/labels_service/update_service.rb12
-rw-r--r--app/views/projects/issues/_new_branch.html.haml11
-rw-r--r--app/workers/click_house/concerns/consistency_worker.rb2
24 files changed, 157 insertions, 136 deletions
diff --git a/app/assets/javascripts/content_editor/services/upload_helpers.js b/app/assets/javascripts/content_editor/services/upload_helpers.js
index 960f28747b0..70fbb9bea42 100644
--- a/app/assets/javascripts/content_editor/services/upload_helpers.js
+++ b/app/assets/javascripts/content_editor/services/upload_helpers.js
@@ -1,3 +1,4 @@
+import { uniqueId } from 'lodash';
import { VARIANT_DANGER } from '~/alert';
import axios from '~/lib/utils/axios_utils';
import { __, sprintf } from '~/locale';
@@ -7,17 +8,17 @@ import { ALERT_EVENT } from '../constants';
const chain = (editor) => editor.chain().setMeta('preventAutolink', true);
-const findUploadedFilePosition = (editor, filename) => {
+const findUploadedFilePosition = (editor, fileId) => {
let position;
editor.view.state.doc.descendants((descendant, pos) => {
- if (descendant.attrs.uploading === filename) {
+ if (descendant.attrs.uploading === fileId) {
position = pos;
return false;
}
for (const mark of descendant.marks) {
- if (mark.type.name === 'link' && mark.attrs.uploading === filename) {
+ if (mark.type.name === 'link' && mark.attrs.uploading === fileId) {
position = pos + 1;
return false;
}
@@ -142,11 +143,12 @@ const uploadMedia = async ({ type, editor, file, uploadsPath, renderMarkdown, ev
const objectUrl = URL.createObjectURL(file);
const { selection } = editor.view.state;
const currentNode = selection.$to.node();
+ const fileId = uniqueId(type);
let position = selection.to;
let content = {
type,
- attrs: { uploading: file.name, src: objectUrl, alt: file.name },
+ attrs: { uploading: fileId, src: objectUrl, alt: file.name },
};
let selectionIncrement = 0;
@@ -170,9 +172,9 @@ const uploadMedia = async ({ type, editor, file, uploadsPath, renderMarkdown, ev
})
.then(({ canonicalSrc }) => {
// the position might have changed while uploading, so we need to find it again
- position = findUploadedFilePosition(editor, file.name);
+ position = findUploadedFilePosition(editor, fileId);
- uploadingStates[file.name] = true;
+ uploadingStates[fileId] = true;
editor.view.dispatch(
editor.state.tr.setMeta('preventAutolink', true).setNodeMarkup(position, undefined, {
@@ -186,7 +188,7 @@ const uploadMedia = async ({ type, editor, file, uploadsPath, renderMarkdown, ev
chain(editor).setNodeSelection(position).run();
})
.catch((e) => {
- position = findUploadedFilePosition(editor, file.name);
+ position = findUploadedFilePosition(editor, fileId);
chain(editor)
.deleteRange({ from: position, to: position + 1 })
@@ -203,14 +205,15 @@ const uploadAttachment = async ({ editor, file, uploadsPath, renderMarkdown, eve
const objectUrl = URL.createObjectURL(file);
const { selection } = editor.view.state;
const currentNode = selection.$to.node();
+ const fileId = uniqueId('file');
- uploadingStates[file.name] = true;
+ uploadingStates[fileId] = true;
let position = selection.to;
let content = {
type: 'text',
text: file.name,
- marks: [{ type: 'link', attrs: { href: objectUrl, uploading: file.name } }],
+ marks: [{ type: 'link', attrs: { href: objectUrl, uploading: fileId } }],
};
// if the current node is not empty, we need to wrap the content in a new paragraph
@@ -229,7 +232,7 @@ const uploadAttachment = async ({ editor, file, uploadsPath, renderMarkdown, eve
})
.then(({ src, canonicalSrc }) => {
// the position might have changed while uploading, so we need to find it again
- position = findUploadedFilePosition(editor, file.name);
+ position = findUploadedFilePosition(editor, fileId);
chain(editor)
.setTextSelection(position)
@@ -238,7 +241,7 @@ const uploadAttachment = async ({ editor, file, uploadsPath, renderMarkdown, eve
.run();
})
.catch((e) => {
- position = findUploadedFilePosition(editor, file.name);
+ position = findUploadedFilePosition(editor, fileId);
chain(editor)
.setTextSelection(position)
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue b/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue
index 89095a55a11..9afed170097 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue
@@ -99,15 +99,11 @@ export default {
return this.state.mergeabilityChecks || [];
},
sortedChecks() {
- return [...this.checks]
- .sort((a, b) => {
- if (a.status === 'FAILED' && b.status !== 'FAILED') return -1;
- if (a.status === 'SUCCESS' && b.status !== 'SUCCESS')
- return b.status === 'FAILED' ? 1 : -1;
+ const order = ['FAILED', 'SUCCESS'];
- return 0;
- })
- .filter((s) => s.status !== 'INACTIVE');
+ return [...this.checks]
+ .filter((s) => s.status !== 'INACTIVE')
+ .sort((a, b) => order.indexOf(a.status) - order.indexOf(b.status));
},
failedChecks() {
return this.checks.filter((c) => c.status.toLowerCase() === 'failed');
diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js b/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js
index d33c0bb4708..ce4a46fe3dd 100644
--- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js
+++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js
@@ -76,9 +76,9 @@ export function processFilters(filters) {
type = FILTERED_SEARCH_TERM;
value = token;
} else {
- type = token.type;
- operator = token.value.operator;
- value = token.value.data;
+ type = token?.type;
+ operator = token?.value?.operator;
+ value = token?.value?.data;
}
if (!acc[type]) {
diff --git a/app/controllers/sent_notifications_controller.rb b/app/controllers/sent_notifications_controller.rb
index 4f61088ab17..8f178174835 100644
--- a/app/controllers/sent_notifications_controller.rb
+++ b/app/controllers/sent_notifications_controller.rb
@@ -11,15 +11,15 @@ class SentNotificationsController < ApplicationController
return render_404 unless unsubscribe_prerequisites_met?
- return unsubscribe_and_redirect if current_user || params[:force]
+ unsubscribe_and_redirect if current_user || params[:force]
end
private
def unsubscribe_prerequisites_met?
@sent_notification.present? &&
- @sent_notification.unsubscribable? &&
- noteable.present?
+ @sent_notification.unsubscribable? &&
+ noteable.present?
end
def noteable
@@ -29,9 +29,7 @@ class SentNotificationsController < ApplicationController
def unsubscribe_and_redirect
noteable.unsubscribe(@sent_notification.recipient, @sent_notification.project)
- if noteable.is_a?(Issue) && @sent_notification.recipient_id == Users::Internal.support_bot.id
- noteable.unsubscribe_email_participant(noteable.external_author)
- end
+ unsubscribe_issue_email_participant
flash[:notice] = _("You have been unsubscribed from this thread.")
@@ -46,6 +44,15 @@ class SentNotificationsController < ApplicationController
end
end
+ def unsubscribe_issue_email_participant
+ return unless noteable.is_a?(Issue)
+ return unless @sent_notification.recipient_id == Users::Internal.support_bot.id
+
+ # Unsubscribe external author for legacy reasons when no issue email participant is set
+ email = @sent_notification.issue_email_participant&.email || noteable.external_author
+ noteable.unsubscribe_email_participant(email)
+ end
+
def noteable_path(noteable)
case noteable
when Issue
diff --git a/app/graphql/mutations/work_items/update_task.rb b/app/graphql/mutations/work_items/update_task.rb
deleted file mode 100644
index d3df235f894..00000000000
--- a/app/graphql/mutations/work_items/update_task.rb
+++ /dev/null
@@ -1,70 +0,0 @@
-# frozen_string_literal: true
-
-module Mutations
- module WorkItems
- class UpdateTask < BaseMutation
- graphql_name 'WorkItemUpdateTask'
- description "Updates a work item's task by Global ID."
-
- include Mutations::SpamProtection
-
- authorize :read_work_item
-
- argument :id, ::Types::GlobalIDType[::WorkItem],
- required: true,
- description: 'Global ID of the work item.'
- argument :task_data, ::Types::WorkItems::UpdatedTaskInputType,
- required: true,
- description: 'Arguments necessary to update a task.'
-
- field :task, Types::WorkItemType,
- null: true,
- description: 'Updated task.'
- field :work_item, Types::WorkItemType,
- null: true,
- description: 'Updated work item.'
-
- def resolve(id:, task_data:)
- task_data_hash = task_data.to_h
- work_item = authorized_find!(id: id)
- task = authorized_find_task!(task_data_hash[:id])
-
- ::WorkItems::UpdateService.new(
- container: task.project,
- current_user: current_user,
- params: task_data_hash.except(:id),
- perform_spam_check: true
- ).execute(task)
-
- check_spam_action_response!(task)
-
- response = { errors: errors_on_object(task) }
-
- if task.valid?
- work_item.expire_etag_cache
-
- response.merge(work_item: work_item, task: task)
- else
- response
- end
- end
-
- private
-
- def authorized_find_task!(task_id)
- task = task_id.find
-
- if current_user.can?(:update_work_item, task)
- task
- else
- # Fail early if user cannot update task
- raise_resource_not_available_error!
- end
- end
-
- def find_object(id:)
- id.find
- end
- end
- end
-end
diff --git a/app/graphql/types/mutation_type.rb b/app/graphql/types/mutation_type.rb
index 51ab6880b1a..94bb3055bc4 100644
--- a/app/graphql/types/mutation_type.rb
+++ b/app/graphql/types/mutation_type.rb
@@ -191,7 +191,6 @@ module Types
mount_mutation Mutations::WorkItems::CreateFromTask, alpha: { milestone: '15.1' }
mount_mutation Mutations::WorkItems::Delete, alpha: { milestone: '15.1' }
mount_mutation Mutations::WorkItems::Update, alpha: { milestone: '15.1' }
- mount_mutation Mutations::WorkItems::UpdateTask, alpha: { milestone: '15.1' }
mount_mutation Mutations::WorkItems::Export, alpha: { milestone: '15.10' }
mount_mutation Mutations::WorkItems::Convert, alpha: { milestone: '15.11' }
mount_mutation Mutations::WorkItems::LinkedItems::Add, alpha: { milestone: '16.3' }
diff --git a/app/graphql/types/work_items/updated_task_input_type.rb b/app/graphql/types/work_items/updated_task_input_type.rb
deleted file mode 100644
index 9f8afa2ff1b..00000000000
--- a/app/graphql/types/work_items/updated_task_input_type.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-module Types
- module WorkItems
- class UpdatedTaskInputType < BaseInputObject
- graphql_name 'WorkItemUpdatedTaskInput'
-
- include Mutations::WorkItems::UpdateArguments
- end
- end
-end
diff --git a/app/mailers/emails/service_desk.rb b/app/mailers/emails/service_desk.rb
index 64e6122f9c7..58890fd29c5 100644
--- a/app/mailers/emails/service_desk.rb
+++ b/app/mailers/emails/service_desk.rb
@@ -37,7 +37,7 @@ module Emails
def service_desk_new_note_email(issue_id, note_id, recipient)
@note = Note.find(note_id)
- setup_service_desk_mail(issue_id)
+ setup_service_desk_mail(issue_id, recipient)
# Prepare uploads for text replacement in markdown content
setup_service_desk_attachments
@@ -49,7 +49,7 @@ module Emails
options = {
from: email_sender,
- to: recipient,
+ to: recipient.email,
subject: subject_base,
**service_desk_template_content_options('new_note')
}
@@ -119,14 +119,20 @@ module Emails
private
- def setup_service_desk_mail(issue_id)
+ def setup_service_desk_mail(issue_id, issue_email_participant = nil)
@issue = Issue.find(issue_id)
@project = @issue.project
@support_bot = Users::Internal.support_bot
@service_desk_setting = @project.service_desk_setting
- @sent_notification = SentNotification.record(@issue, @support_bot.id, reply_key)
+ if issue_email_participant.blank? && @issue.external_author.present?
+ issue_email_participant = @issue.issue_email_participants.find_by_email(@issue.external_author)
+ end
+
+ @sent_notification = SentNotification.record(@issue, @support_bot.id, reply_key, {
+ issue_email_participant: issue_email_participant
+ })
end
def service_desk_template_content_options(email_type)
diff --git a/app/mailers/previews/notify_preview.rb b/app/mailers/previews/notify_preview.rb
index c3987d85381..c7d6f2843de 100644
--- a/app/mailers/previews/notify_preview.rb
+++ b/app/mailers/previews/notify_preview.rb
@@ -243,8 +243,9 @@ class NotifyPreview < ActionMailer::Preview
def service_desk_new_note_email
cleanup do
note = create_note(noteable_type: 'Issue', noteable_id: issue.id, note: 'Issue note content')
+ participant = IssueEmailParticipant.create!(issue: issue, email: 'user@example.com')
- Notify.service_desk_new_note_email(issue.id, note.id, 'someone@gitlab.com').message
+ Notify.service_desk_new_note_email(issue.id, note.id, participant).message
end
end
diff --git a/app/models/sent_notification.rb b/app/models/sent_notification.rb
index f3a0479d3b7..66da5369d38 100644
--- a/app/models/sent_notification.rb
+++ b/app/models/sent_notification.rb
@@ -4,6 +4,7 @@ class SentNotification < ApplicationRecord
belongs_to :project
belongs_to :noteable, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :recipient, class_name: "User"
+ belongs_to :issue_email_participant
validates :recipient, presence: true
validates :reply_key, presence: true, uniqueness: true
diff --git a/app/models/work_items/widgets/base.rb b/app/models/work_items/widgets/base.rb
index c4e87decdbf..a3051f17158 100644
--- a/app/models/work_items/widgets/base.rb
+++ b/app/models/work_items/widgets/base.rb
@@ -15,10 +15,18 @@ module WorkItems
[]
end
+ def self.sync_params
+ []
+ end
+
def self.process_quick_action_param(param_name, value)
{ param_name => value }
end
+ def self.process_sync_params(params)
+ params
+ end
+
def self.callback_class
WorkItems::Callbacks.const_get(name.demodulize, false)
rescue NameError
diff --git a/app/models/work_items/widgets/hierarchy.rb b/app/models/work_items/widgets/hierarchy.rb
index fc6714f1e08..1d888dd71a8 100644
--- a/app/models/work_items/widgets/hierarchy.rb
+++ b/app/models/work_items/widgets/hierarchy.rb
@@ -23,6 +23,10 @@ module WorkItems
[:set_parent, :add_child]
end
+ def self.sync_params
+ [:parent]
+ end
+
def self.process_quick_action_param(param_name, value)
return super unless param_name.in?(quick_action_params) && value.present?
@@ -30,6 +34,16 @@ module WorkItems
return { children: value } if param_name == :add_child
end
+
+ def self.process_sync_params(params)
+ parent_param = params.fetch(:parent, nil)
+
+ if parent_param&.work_item
+ { parent: parent_param.work_item }
+ else
+ {}
+ end
+ end
end
end
end
diff --git a/app/models/work_items/widgets/labels.rb b/app/models/work_items/widgets/labels.rb
index e8b36156fec..0b5a231deff 100644
--- a/app/models/work_items/widgets/labels.rb
+++ b/app/models/work_items/widgets/labels.rb
@@ -13,6 +13,10 @@ module WorkItems
def self.quick_action_params
[:add_label_ids, :remove_label_ids, :label_ids]
end
+
+ def self.sync_params
+ [:label_ids]
+ end
end
end
end
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index 6ec0a46518a..cef97a42f11 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -243,6 +243,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy
enable :destroy_deploy_token
enable :update_runners_registration_token
enable :owner_access
+ enable :update_git_access_protocol
enable :read_billing
enable :edit_billing
diff --git a/app/services/click_house/sync_strategies/base_sync_strategy.rb b/app/services/click_house/sync_strategies/base_sync_strategy.rb
index 58c2161b83c..54f0f084d05 100644
--- a/app/services/click_house/sync_strategies/base_sync_strategy.rb
+++ b/app/services/click_house/sync_strategies/base_sync_strategy.rb
@@ -41,7 +41,7 @@ module ClickHouse
private
def enabled?
- ClickHouse::Client.database_configured?(:main)
+ Gitlab::ClickHouse.configured?
end
def context
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb
index 0240d0184ac..27c52fc7303 100644
--- a/app/services/issuable_base_service.rb
+++ b/app/services/issuable_base_service.rb
@@ -227,6 +227,7 @@ class IssuableBaseService < ::BaseContainerService
def create(issuable, skip_system_notes: false)
initialize_callbacks!(issuable)
+ prepare_create_params(issuable)
handle_quick_actions(issuable)
filter_params(issuable)
@@ -289,6 +290,10 @@ class IssuableBaseService < ::BaseContainerService
# To be overridden by subclasses
end
+ def prepare_create_params(issuable)
+ # To be overridden by subclasses
+ end
+
def after_update(issuable, old_associations)
handle_description_updated(issuable)
handle_label_changes(issuable, old_associations[:labels])
diff --git a/app/services/namespace_settings/update_service.rb b/app/services/namespace_settings/update_service.rb
index 92766bc0267..f6f59738d44 100644
--- a/app/services/namespace_settings/update_service.rb
+++ b/app/services/namespace_settings/update_service.rb
@@ -31,6 +31,10 @@ module NamespaceSettings
param_key: :default_branch_protection_defaults,
user_policy: :update_default_branch_protection
)
+ validate_settings_param_for_root_group(
+ param_key: :enabled_git_access_protocol,
+ user_policy: :update_git_access_protocol
+ )
handle_default_branch_protection unless settings_params[:default_branch_protection].blank?
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 36431c1cbde..3c40707d0c6 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -446,14 +446,18 @@ class NotificationService
return unless note.project.service_desk_enabled?
issue = note.noteable
- recipients = issue.email_participants_emails
+ recipients = issue.issue_email_participants
return unless recipients.any?
- support_bot = Users::Internal.support_bot
- recipients.delete(issue.external_author) if note.author == support_bot
+ # Only populated if note is from external participant
+ note_external_author = note.note_metadata&.email_participant&.downcase
recipients.each do |recipient|
+ # Don't send Service Desk notification if the recipient is the author of the note.
+ # We store emails as-is but compare downcased versions.
+ next if recipient.email.downcase == note_external_author
+
mailer.service_desk_new_note_email(issue.id, note.id, recipient).deliver_later
Gitlab::Metrics::BackgroundTransaction.current&.add_event(:service_desk_new_note_email)
end
diff --git a/app/services/work_items/create_service.rb b/app/services/work_items/create_service.rb
index f9eadc3fb60..e1e6063c8ac 100644
--- a/app/services/work_items/create_service.rb
+++ b/app/services/work_items/create_service.rb
@@ -53,6 +53,21 @@ module WorkItems
end
end
+ def prepare_create_params(work_item)
+ execute_widgets(
+ work_item: work_item,
+ callback: :prepare_create_params,
+ widget_params: @widget_params,
+ service_params: params
+ )
+
+ super
+ end
+
+ def parent
+ container
+ end
+
private
override :handle_quick_actions
diff --git a/app/services/work_items/widgets/labels_service/base_service.rb b/app/services/work_items/widgets/labels_service/base_service.rb
new file mode 100644
index 00000000000..2d679c1f18c
--- /dev/null
+++ b/app/services/work_items/widgets/labels_service/base_service.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module WorkItems
+ module Widgets
+ module LabelsService
+ class BaseService < WorkItems::Widgets::BaseService
+ private
+
+ def prepare_params(params: {}, permitted_params: [])
+ clear_label_params(params) if new_type_excludes_widget?
+
+ return if params.blank?
+ return unless has_permission?(:set_work_item_metadata)
+
+ service_params.merge!(params.slice(*permitted_params))
+ end
+
+ def clear_label_params(params)
+ params[:remove_label_ids] = @work_item.labels.map(&:id)
+ params[:add_label_ids] = []
+ end
+ end
+ end
+ end
+end
diff --git a/app/services/work_items/widgets/labels_service/create_service.rb b/app/services/work_items/widgets/labels_service/create_service.rb
new file mode 100644
index 00000000000..bed6be173cc
--- /dev/null
+++ b/app/services/work_items/widgets/labels_service/create_service.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module WorkItems
+ module Widgets
+ module LabelsService
+ class CreateService < BaseService
+ def prepare_create_params(params: {})
+ prepare_params(params: params, permitted_params: %i[add_label_ids remove_label_ids label_ids])
+ end
+
+ def clear_label_params(params)
+ params[:add_label_ids] = []
+ params[:label_ids] = []
+ end
+ end
+ end
+ end
+end
diff --git a/app/services/work_items/widgets/labels_service/update_service.rb b/app/services/work_items/widgets/labels_service/update_service.rb
index b0791571924..780451e3eae 100644
--- a/app/services/work_items/widgets/labels_service/update_service.rb
+++ b/app/services/work_items/widgets/labels_service/update_service.rb
@@ -3,17 +3,9 @@
module WorkItems
module Widgets
module LabelsService
- class UpdateService < WorkItems::Widgets::BaseService
+ class UpdateService < BaseService
def prepare_update_params(params: {})
- if new_type_excludes_widget?
- params[:remove_label_ids] = @work_item.labels.map(&:id)
- params[:add_label_ids] = []
- end
-
- return if params.blank?
- return unless has_permission?(:set_work_item_metadata)
-
- service_params.merge!(params.slice(:add_label_ids, :remove_label_ids))
+ prepare_params(params: params, permitted_params: %i[add_label_ids remove_label_ids])
end
end
end
diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml
index 68de9c44e38..2f2f67ce3cd 100644
--- a/app/views/projects/issues/_new_branch.html.haml
+++ b/app/views/projects/issues/_new_branch.html.haml
@@ -48,18 +48,17 @@
%label{ for: 'new-branch-name' }
= _('Branch name')
%input#new-branch-name.js-branch-name.form-control.gl-form-input{ type: 'text', placeholder: "#{@issue.to_branch_name}", value: "#{@issue.to_branch_name}" }
- %span.js-branch-message.form-text
+ %span.js-branch-message.form-text.gl-font-sm
.form-group
%label{ for: 'source-name' }
= _('Source (branch or tag)')
%input#source-name.js-ref.ref.form-control.gl-form-input{ type: 'text', placeholder: "#{@project.default_branch}", value: "#{@project.default_branch}", data: { value: "#{@project.default_branch}" } }
- %span.js-ref-message.form-text
+ %span.js-ref-message.form-text.gl-font-sm
- .form-group
- = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'js-create-target', data: { action: 'create-mr' } }) do
- = create_mr_text
+ = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'js-create-target', data: { action: 'create-mr' } }) do
+ = create_mr_text
- if can_create_confidential_merge_request?
- %p.gl-text-orange-500.js-exposed-info-warning.gl-display-none
+ %p.gl-text-orange-500.gl-font-sm.js-exposed-info-warning.gl-display-none
= _('This may expose confidential information as the selected fork is in another namespace that can have other members.')
diff --git a/app/workers/click_house/concerns/consistency_worker.rb b/app/workers/click_house/concerns/consistency_worker.rb
index 5fa1608ea2f..3ed0188ba88 100644
--- a/app/workers/click_house/concerns/consistency_worker.rb
+++ b/app/workers/click_house/concerns/consistency_worker.rb
@@ -66,7 +66,7 @@ module ClickHouse
end
def enabled?
- ClickHouse::Client.database_configured?(:main) && Feature.enabled?(:event_sync_worker_for_click_house)
+ Gitlab::ClickHouse.configured? && Feature.enabled?(:event_sync_worker_for_click_house)
end
def runtime_limiter