summaryrefslogtreecommitdiff
path: root/lib/gitlab/issues_labels.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/issues_labels.rb')
-rw-r--r--lib/gitlab/issues_labels.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/gitlab/issues_labels.rb b/lib/gitlab/issues_labels.rb
new file mode 100644
index 00000000000..bc49d27b521
--- /dev/null
+++ b/lib/gitlab/issues_labels.rb
@@ -0,0 +1,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