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
|
2013-05-07 12:26:41 -04:00
|
|
|
def generate(project)
|
2014-07-29 15:19:47 -04:00
|
|
|
red = '#d9534f'
|
|
|
|
yellow = '#f0ad4e'
|
|
|
|
blue = '#428bca'
|
|
|
|
green = '#5cb85c'
|
|
|
|
|
|
|
|
labels = [
|
|
|
|
{ title: "bug", color: red },
|
|
|
|
{ title: "critical", color: red },
|
|
|
|
{ title: "confirmed", color: red },
|
|
|
|
{ title: "documentation", color: yellow },
|
|
|
|
{ title: "support", color: yellow },
|
|
|
|
{ title: "discussion", color: blue },
|
|
|
|
{ title: "suggestion", color: blue },
|
|
|
|
{ title: "enhancement", color: green }
|
|
|
|
]
|
2013-05-07 10:57:59 -04:00
|
|
|
|
2014-07-29 15:19:47 -04:00
|
|
|
labels.each do |label|
|
|
|
|
project.labels.create(label)
|
2014-07-29 12:19:26 -04:00
|
|
|
end
|
2013-05-07 10:57:59 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|