issues_labels.rb 550 Bytes
Newer Older
1
module Gitlab
2
  class IssuesLabels
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    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

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

23
24
        project.issues_default_label_list = labels
        project.save
25
26
27
28
      end
    end
  end
end