2013-05-07 10:57:59 -04:00
|
|
|
module Gitlab
|
2013-05-07 12:26:41 -04:00
|
|
|
class IssuesLabels
|
2013-05-07 10:57:59 -04:00
|
|
|
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
|
|
|
|
|
2013-05-07 12:26:41 -04:00
|
|
|
def generate(project)
|
2013-05-07 10:57:59 -04:00
|
|
|
labels = important_labels + warning_labels + neutral_labels + positive_labels
|
|
|
|
|
2013-05-07 12:26:41 -04:00
|
|
|
project.issues_default_label_list = labels
|
|
|
|
project.save
|
2013-05-07 10:57:59 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|