(refs #31)Make it possible to create empty repository.

This commit is contained in:
takezoe
2013-07-09 19:41:00 +09:00
parent f94af86ff9
commit ebc858aed9
8 changed files with 169 additions and 90 deletions

View File

@@ -11,19 +11,17 @@ trait RepositoryService { self: AccountService =>
/**
* Creates a new repository.
*
* The project is created as public repository at first. Users can modify the project type at the repository settings
* page after the project creation to configure the project as the private repository.
*
* @param repositoryName the repository name
* @param userName the user name of the repository owner
* @param description the repository description
* @param isPrivate the repository type (private is true, otherwise false)
*/
def createRepository(repositoryName: String, userName: String, description: Option[String]): Unit = {
def createRepository(repositoryName: String, userName: String, description: Option[String], isPrivate: Boolean): Unit = {
Repositories insert
Repository(
userName = userName,
repositoryName = repositoryName,
isPrivate = false,
isPrivate = isPrivate,
description = description,
defaultBranch = "master",
registeredDate = currentDate,