diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:10:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:10:39 +0000 |
commit | e4fc62c0af80cfaaa907aea83ae4012e06a1f9e4 (patch) | |
tree | 77758b2c2b0ae196be08358f6081a37518ec4317 /lib | |
parent | a6508d0028191c42620414994b2fe4ce62467a73 (diff) | |
download | gitlab-ce-e4fc62c0af80cfaaa907aea83ae4012e06a1f9e4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/pipeline/markup_pipeline.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/file_hook.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/usage_data_counters/known_events/code_review_events.yml | 8 | ||||
-rw-r--r-- | lib/gitlab/usage_data_counters/merge_request_activity_unique_counter.rb | 10 | ||||
-rw-r--r-- | lib/tasks/file_hooks.rake | 7 |
5 files changed, 22 insertions, 8 deletions
diff --git a/lib/banzai/pipeline/markup_pipeline.rb b/lib/banzai/pipeline/markup_pipeline.rb index c86d5f08ded..17a73f29afb 100644 --- a/lib/banzai/pipeline/markup_pipeline.rb +++ b/lib/banzai/pipeline/markup_pipeline.rb @@ -9,7 +9,8 @@ module Banzai Filter::AssetProxyFilter, Filter::ExternalLinkFilter, Filter::PlantumlFilter, - Filter::SyntaxHighlightFilter + Filter::SyntaxHighlightFilter, + Filter::KrokiFilter ] end diff --git a/lib/gitlab/file_hook.rb b/lib/gitlab/file_hook.rb index e398a3f9585..a8719761278 100644 --- a/lib/gitlab/file_hook.rb +++ b/lib/gitlab/file_hook.rb @@ -11,7 +11,7 @@ module Gitlab end def self.dir_glob - Dir.glob([Rails.root.join('file_hooks/*'), Rails.root.join('plugins/*')]) + Dir.glob(Rails.root.join('file_hooks/*')) end private_class_method :dir_glob diff --git a/lib/gitlab/usage_data_counters/known_events/code_review_events.yml b/lib/gitlab/usage_data_counters/known_events/code_review_events.yml index cc89fbd5caf..038189f9835 100644 --- a/lib/gitlab/usage_data_counters/known_events/code_review_events.yml +++ b/lib/gitlab/usage_data_counters/known_events/code_review_events.yml @@ -219,3 +219,11 @@ category: code_review aggregation: weekly feature_flag: diff_settings_usage_data +- name: i_code_review_user_load_conflict_ui + redis_slot: code_review + category: code_review + aggregation: weekly +- name: i_code_review_user_resolve_conflict + redis_slot: code_review + category: code_review + aggregation: weekly diff --git a/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter.rb b/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter.rb index eb28a387a97..bdda064de20 100644 --- a/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter.rb +++ b/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter.rb @@ -44,6 +44,8 @@ module Gitlab MR_INCLUDING_CI_CONFIG_ACTION = 'o_pipeline_authoring_unique_users_pushing_mr_ciconfigfile' MR_MILESTONE_CHANGED_ACTION = 'i_code_review_user_milestone_changed' MR_LABELS_CHANGED_ACTION = 'i_code_review_user_labels_changed' + MR_LOAD_CONFLICT_UI_ACTION = 'i_code_review_user_load_conflict_ui' + MR_RESOLVE_CONFLICT_ACTION = 'i_code_review_user_resolve_conflict' class << self def track_mr_diffs_action(merge_request:) @@ -201,6 +203,14 @@ module Gitlab track_unique_action_by_user(MR_LABELS_CHANGED_ACTION, user) end + def track_loading_conflict_ui_action(user:) + track_unique_action_by_user(MR_LOAD_CONFLICT_UI_ACTION, user) + end + + def track_resolve_conflict_action(user:) + track_unique_action_by_user(MR_RESOLVE_CONFLICT_ACTION, user) + end + private def track_unique_action_by_merge_request(action, merge_request) diff --git a/lib/tasks/file_hooks.rake b/lib/tasks/file_hooks.rake index a892d36b48e..5eb49808eff 100644 --- a/lib/tasks/file_hooks.rake +++ b/lib/tasks/file_hooks.rake @@ -3,14 +3,9 @@ namespace :file_hooks do desc 'Validate existing file hooks' task validate: :environment do - puts 'Validating file hooks from /file_hooks and /plugins directories' + puts 'Validating file hooks from /file_hooks directories' Gitlab::FileHook.files.each do |file| - if File.dirname(file).ends_with?('plugins') - puts 'DEPRECATED: /plugins directory is deprecated and will be removed in 14.0. ' \ - 'Please move your files into /file_hooks directory.' - end - success, message = Gitlab::FileHook.execute(file, Gitlab::DataBuilder::Push::SAMPLE_DATA) if success |