diff --git a/src/main/scala/app/CreateRepositoryController.scala b/src/main/scala/app/CreateRepositoryController.scala index 0430077..d90397f 100644 --- a/src/main/scala/app/CreateRepositoryController.scala +++ b/src/main/scala/app/CreateRepositoryController.scala @@ -10,13 +10,13 @@ import jp.sf.amateras.scalatra.forms._ class CreateRepositoryController extends CreateRepositoryControllerBase - with RepositoryService with AccountService with WikiService with UsersOnlyAuthenticator + with RepositoryService with AccountService with WikiService with LabelsService with UsersOnlyAuthenticator /** * Creates new repository. */ trait CreateRepositoryControllerBase extends ControllerBase { - self: RepositoryService with WikiService with UsersOnlyAuthenticator => + self: RepositoryService with WikiService with LabelsService with UsersOnlyAuthenticator => case class RepositoryCreationForm(name: String, description: Option[String]) @@ -41,6 +41,14 @@ // Insert to the database at first createRepository(form.name, loginUserName, form.description) + // Insert default labels + createLabel(loginUserName, form.name, "bug", "fc2929") + createLabel(loginUserName, form.name, "duplicate", "cccccc") + createLabel(loginUserName, form.name, "enhancement", "84b6eb") + createLabel(loginUserName, form.name, "invalid", "e6e6e6") + createLabel(loginUserName, form.name, "question", "cc317c") + createLabel(loginUserName, form.name, "wontfix", "ffffff") + // Create the actual repository val gitdir = getRepositoryDir(loginUserName, form.name) val repository = new RepositoryBuilder().setGitDir(gitdir).setBare.build