Commit f5ffeac0 authored by Valery Sizov's avatar Valery Sizov

Create labels in new project

parent 57d00130
......@@ -35,6 +35,7 @@ v 8.0.0 (unreleased)
- Added Drone CI integration (Kirill Zaitsev)
- Refactored service API and added automatically service docs generator (Kirill Zaitsev)
- Added web_url key project hook_attrs (Kirill Zaitsev)
- Global Labels that are available to all projects
v 7.14.1
- Improve abuse reports management from admin area
......
......@@ -401,6 +401,15 @@ class Project < ActiveRecord::Base
end
end
def create_labels
Label.templates.each do |label|
label = label.dup
label.template = nil
label.project_id = self.id
label.save
end
end
def find_service(list, name)
list.find { |service| service.to_param == name }
end
......
......@@ -87,6 +87,8 @@ module Projects
@project.build_missing_services
@project.create_labels
event_service.create_project(@project, current_user)
system_hook_service.execute_hooks_for(@project, :create)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment