From 0b3e2951a422fd4544647b0fbbc07ad2d0a670b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Coutable?= <remy@rymai.me>
Date: Wed, 3 Jun 2020 17:59:37 +0200
Subject: [PATCH] Transition to scoped feature/tooling labels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This is a preparatory step before we deprecate and move away from the
`backstage` label.

Next step will be removing references to `backstage`:
https://gitlab.com/gitlab-org/gitlab/-/issues/219751

See
https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/488#proposal
for the overall plan.

Signed-off-by: Rémy Coutable <remy@rymai.me>
---
 danger/metadata/Dangerfile     | 7 ++++++-
 danger/specs/Dangerfile        | 9 ++++++++-
 lib/gitlab/danger/changelog.rb | 9 ++++++++-
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/danger/metadata/Dangerfile b/danger/metadata/Dangerfile
index b33136749518b..504db88d1d36e 100644
--- a/danger/metadata/Dangerfile
+++ b/danger/metadata/Dangerfile
@@ -4,8 +4,13 @@ THROUGHPUT_LABELS = [
   'Community contribution',
   'security',
   'bug',
+  'backstage', # To be removed by https://gitlab.com/gitlab-org/gitlab/-/issues/222360.
   'feature',
-  'backstage',
+  'feature::addition',
+  'feature::maintenance',
+  'tooling',
+  'tooling::pipelines',
+  'tooling::workflow',
   'documentation'
 ].freeze
 
diff --git a/danger/specs/Dangerfile b/danger/specs/Dangerfile
index 784ce75fef830..d5951e6d6c12d 100644
--- a/danger/specs/Dangerfile
+++ b/danger/specs/Dangerfile
@@ -1,6 +1,13 @@
 # frozen_string_literal: true
 
-NO_SPECS_LABELS = %w[backstage documentation QA].freeze
+NO_SPECS_LABELS = [
+  'backstage', # To be removed by https://gitlab.com/gitlab-org/gitlab/-/issues/222360.
+  'tooling',
+  'tooling::pipelines',
+  'tooling::workflow',
+  'documentation',
+  'QA'
+].freeze
 NO_NEW_SPEC_MESSAGE = <<~MSG
 You've made some app changes, but didn't add any tests.
 That's OK as long as you're refactoring existing code,
diff --git a/lib/gitlab/danger/changelog.rb b/lib/gitlab/danger/changelog.rb
index 85f386594be26..4589bc435e113 100644
--- a/lib/gitlab/danger/changelog.rb
+++ b/lib/gitlab/danger/changelog.rb
@@ -3,7 +3,14 @@
 module Gitlab
   module Danger
     module Changelog
-      NO_CHANGELOG_LABELS = %w[backstage ci-build meta].freeze
+      NO_CHANGELOG_LABELS = [
+        'backstage', # To be removed by https://gitlab.com/gitlab-org/gitlab/-/issues/222360.
+        'tooling',
+        'tooling::pipelines',
+        'tooling::workflow',
+        'ci-build',
+        'meta'
+      ].freeze
       NO_CHANGELOG_CATEGORIES = %i[docs none].freeze
 
       def needed?
-- 
GitLab