diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 19:19:26 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 19:19:26 +0300 |
commit | d45a6b2941f30d71f828e0fc8adaeab19f87b1a0 (patch) | |
tree | d774fc68fdafdce0936924418be2e10743f2af74 /lib/gitlab/issues_labels.rb | |
parent | 6fb9badcaef5152c60bf4091899a84b34f5cc1b8 (diff) | |
download | gitlab-ce-d45a6b2941f30d71f828e0fc8adaeab19f87b1a0.tar.gz |
Migrate issue/mr labels from act_as_taggable to own labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/gitlab/issues_labels.rb')
-rw-r--r-- | lib/gitlab/issues_labels.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/issues_labels.rb b/lib/gitlab/issues_labels.rb index bc49d27b521..9da1977a3d6 100644 --- a/lib/gitlab/issues_labels.rb +++ b/lib/gitlab/issues_labels.rb @@ -18,10 +18,11 @@ module Gitlab end def generate(project) - labels = important_labels + warning_labels + neutral_labels + positive_labels + label_names = important_labels + warning_labels + neutral_labels + positive_labels - project.issues_default_label_list = labels - project.save + label_names.each do |label_name| + project.labels.create(title: label_name) + end end end end |