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

issues_labels.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc49d27b521e69fd3d4f7b9de5774b42f3e2b408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Gitlab
  class IssuesLabels
    class << self
      def important_labels
        %w(bug critical confirmed)
      end

      def warning_labels
        %w(documentation support)
      end

      def neutral_labels
        %w(discussion suggestion)
      end

      def positive_labels
        %w(feature enhancement)
      end

      def generate(project)
        labels = important_labels + warning_labels + neutral_labels + positive_labels

        project.issues_default_label_list = labels
        project.save
      end
    end
  end
end