From 90fa047c0dbb0a5e97c384fa6c45991c04acba5f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 14 Apr 2021 06:09:06 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- danger/datateam/Dangerfile | 15 +++++++++++++++ spec/tooling/danger/project_helper_spec.rb | 2 +- tooling/danger/project_helper.rb | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 danger/datateam/Dangerfile diff --git a/danger/datateam/Dangerfile b/danger/datateam/Dangerfile new file mode 100644 index 00000000000..0a33cb6777b --- /dev/null +++ b/danger/datateam/Dangerfile @@ -0,0 +1,15 @@ +# frozen_string_literal: true +# rubocop:disable Style/SignalException + +CHANGED_SCHEMA_MESSAGE = <<~MSG +Mentioning @gitlab-data/engineers to notify the team about changes to the db/structure.sql file. + +MSG + +db_schema_updated = !git.modified_files.grep(%r{\Adb/structure\.sql}).empty? + +if db_schema_updated + + markdown(CHANGED_SCHEMA_MESSAGE) + +end diff --git a/spec/tooling/danger/project_helper_spec.rb b/spec/tooling/danger/project_helper_spec.rb index a04db3c4954..5d106f08402 100644 --- a/spec/tooling/danger/project_helper_spec.rb +++ b/spec/tooling/danger/project_helper_spec.rb @@ -220,7 +220,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do describe '.local_warning_message' do it 'returns an informational message with rules that can run' do - expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changelog, changes_size, commit_messages, database, documentation, duplicate_yarn_dependencies, eslint, karma, pajamas, pipeline, prettier, product_intelligence, utility_css') + expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changelog, changes_size, commit_messages, database, datateam, documentation, duplicate_yarn_dependencies, eslint, karma, pajamas, pipeline, prettier, product_intelligence, utility_css') end end diff --git a/tooling/danger/project_helper.rb b/tooling/danger/project_helper.rb index 298aeb08737..7aac0de0b6b 100644 --- a/tooling/danger/project_helper.rb +++ b/tooling/danger/project_helper.rb @@ -8,6 +8,7 @@ module Tooling changes_size commit_messages database + datateam documentation duplicate_yarn_dependencies eslint