From c1f43cf4a4f4d854c7e1eb3e181e9a4a2dbac821 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Coutable?= <remy@rymai.me>
Date: Thu, 22 Jul 2021 11:56:39 +0200
Subject: [PATCH] Transition from Engineering Productivity to tooling label in
 Danger
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rémy Coutable <remy@rymai.me>
---
 Gemfile                                    |  2 +-
 Gemfile.lock                               |  4 +--
 danger/specialization_labels/Dangerfile    |  2 +-
 spec/tooling/danger/project_helper_spec.rb | 34 +++++++++++-----------
 tooling/danger/project_helper.rb           | 22 +++++++-------
 5 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/Gemfile b/Gemfile
index c14418ba7e39..2e2227d98753 100644
--- a/Gemfile
+++ b/Gemfile
@@ -394,7 +394,7 @@ group :development, :test do
 end
 
 group :development, :test, :danger do
-  gem 'gitlab-dangerfiles', '~> 2.2.2', require: false
+  gem 'gitlab-dangerfiles', '~> 2.3.0', require: false
 end
 
 group :development, :test, :coverage do
diff --git a/Gemfile.lock b/Gemfile.lock
index 617e1f18caab..7cd04312b948 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -460,7 +460,7 @@ GEM
       terminal-table (~> 1.5, >= 1.5.1)
     gitlab-chronic (0.10.5)
       numerizer (~> 0.2)
-    gitlab-dangerfiles (2.2.2)
+    gitlab-dangerfiles (2.3.0)
       danger (>= 8.3.1)
       danger-gitlab (>= 8.0.0)
     gitlab-experiment (0.6.2)
@@ -1467,7 +1467,7 @@ DEPENDENCIES
   gitaly (~> 14.1.0.pre.rc4)
   github-markup (~> 1.7.0)
   gitlab-chronic (~> 0.10.5)
-  gitlab-dangerfiles (~> 2.2.2)
+  gitlab-dangerfiles (~> 2.3.0)
   gitlab-experiment (~> 0.6.2)
   gitlab-fog-azure-rm (~> 1.1.1)
   gitlab-labkit (~> 0.21.0)
diff --git a/danger/specialization_labels/Dangerfile b/danger/specialization_labels/Dangerfile
index 35125f20b146..e86d66f5fbc9 100644
--- a/danger/specialization_labels/Dangerfile
+++ b/danger/specialization_labels/Dangerfile
@@ -8,7 +8,7 @@ SPECIALIZATIONS = {
   frontend: 'frontend',
   docs: 'documentation',
   qa: 'QA',
-  engineering_productivity: 'Engineering Productivity',
+  tooling: 'tooling',
   ci_template: 'ci::templates',
   feature_flag: 'feature flag'
 }.freeze
diff --git a/spec/tooling/danger/project_helper_spec.rb b/spec/tooling/danger/project_helper_spec.rb
index 8bcfac5a6995..1d95fd1fd6be 100644
--- a/spec/tooling/danger/project_helper_spec.rb
+++ b/spec/tooling/danger/project_helper_spec.rb
@@ -77,7 +77,7 @@
       'ee/spec/frontend/bar'             | [:frontend]
       'ee/spec/frontend_integration/bar' | [:frontend]
 
-      '.gitlab/ci/frontend.gitlab-ci.yml' | %i[frontend engineering_productivity]
+      '.gitlab/ci/frontend.gitlab-ci.yml' | %i[frontend tooling]
 
       'app/models/foo'             | [:backend]
       'bin/foo'                    | [:backend]
@@ -113,22 +113,22 @@
       'Rakefile'       | [:backend]
       'FOO_VERSION'    | [:backend]
 
-      'Dangerfile'                                            | [:engineering_productivity]
-      'danger/bundle_size/Dangerfile'                         | [:engineering_productivity]
-      'ee/danger/bundle_size/Dangerfile'                      | [:engineering_productivity]
-      'danger/bundle_size/'                                   | [:engineering_productivity]
-      'ee/danger/bundle_size/'                                | [:engineering_productivity]
-      '.gitlab-ci.yml'                                        | [:engineering_productivity]
-      '.gitlab/ci/cng.gitlab-ci.yml'                          | [:engineering_productivity]
-      '.gitlab/ci/ee-specific-checks.gitlab-ci.yml'           | [:engineering_productivity]
-      'scripts/foo'                                           | [:engineering_productivity]
-      'tooling/danger/foo'                                    | [:engineering_productivity]
-      'ee/tooling/danger/foo'                                 | [:engineering_productivity]
-      'lefthook.yml'                                          | [:engineering_productivity]
-      '.editorconfig'                                         | [:engineering_productivity]
-      'tooling/bin/find_foss_tests'                           | [:engineering_productivity]
-      '.codeclimate.yml'                                      | [:engineering_productivity]
-      '.gitlab/CODEOWNERS'                                    | [:engineering_productivity]
+      'Dangerfile'                                            | [:tooling]
+      'danger/bundle_size/Dangerfile'                         | [:tooling]
+      'ee/danger/bundle_size/Dangerfile'                      | [:tooling]
+      'danger/bundle_size/'                                   | [:tooling]
+      'ee/danger/bundle_size/'                                | [:tooling]
+      '.gitlab-ci.yml'                                        | [:tooling]
+      '.gitlab/ci/cng.gitlab-ci.yml'                          | [:tooling]
+      '.gitlab/ci/ee-specific-checks.gitlab-ci.yml'           | [:tooling]
+      'scripts/foo'                                           | [:tooling]
+      'tooling/danger/foo'                                    | [:tooling]
+      'ee/tooling/danger/foo'                                 | [:tooling]
+      'lefthook.yml'                                          | [:tooling]
+      '.editorconfig'                                         | [:tooling]
+      'tooling/bin/find_foss_tests'                           | [:tooling]
+      '.codeclimate.yml'                                      | [:tooling]
+      '.gitlab/CODEOWNERS'                                    | [:tooling]
 
       'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml'   | [:ci_template]
       'lib/gitlab/ci/templates/dotNET-Core.yml'               | [:ci_template]
diff --git a/tooling/danger/project_helper.rb b/tooling/danger/project_helper.rb
index 8151e0740969..4bcc398fa525 100644
--- a/tooling/danger/project_helper.rb
+++ b/tooling/danger/project_helper.rb
@@ -74,7 +74,7 @@ module ProjectHelper
 
         %r{(\A|/)(
           \.gitlab/ci/frontend\.gitlab-ci\.yml
-        )\z}x => %i[frontend engineering_productivity],
+        )\z}x => %i[frontend tooling],
 
         %r{\A(ee/)?db/(geo/)?(migrate|post_migrate)/} => [:database, :migration],
         %r{\A(ee/)?db/(?!fixtures)[^/]+} => [:database],
@@ -84,16 +84,16 @@ module ProjectHelper
         %r{\A(ee/)?app/finders/} => [:database, :backend],
         %r{\Arubocop/cop/migration(/|\.rb)} => :database,
 
-        %r{\A(\.gitlab-ci\.yml\z|\.gitlab\/ci)} => :engineering_productivity,
-        %r{\A\.codeclimate\.yml\z} => :engineering_productivity,
-        %r{\Alefthook.yml\z} => :engineering_productivity,
-        %r{\A\.editorconfig\z} => :engineering_productivity,
-        %r{Dangerfile\z} => :engineering_productivity,
-        %r{\A(ee/)?(danger/|tooling/danger/)} => :engineering_productivity,
-        %r{\A(ee/)?scripts/} => :engineering_productivity,
-        %r{\Atooling/} => :engineering_productivity,
-        %r{(CODEOWNERS)} => :engineering_productivity,
-        %r{(tests.yml)} => :engineering_productivity,
+        %r{\A(\.gitlab-ci\.yml\z|\.gitlab\/ci)} => :tooling,
+        %r{\A\.codeclimate\.yml\z} => :tooling,
+        %r{\Alefthook.yml\z} => :tooling,
+        %r{\A\.editorconfig\z} => :tooling,
+        %r{Dangerfile\z} => :tooling,
+        %r{\A(ee/)?(danger/|tooling/danger/)} => :tooling,
+        %r{\A(ee/)?scripts/} => :tooling,
+        %r{\Atooling/} => :tooling,
+        %r{(CODEOWNERS)} => :tooling,
+        %r{(tests.yml)} => :tooling,
 
         %r{\Alib/gitlab/ci/templates} => :ci_template,
 
-- 
GitLab