Make repo creation for API similar to UI (#6142)

tokarchuk/v1.17
John Olheiser 6 years ago committed by techknowlogick
parent 3b61ff1895
commit df30010dbd
  1. 3
      routers/api/v1/repo/repo.go

@ -213,6 +213,9 @@ func Search(ctx *context.APIContext) {
// CreateUserRepo create a repository for a user
func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateRepoOption) {
if opt.AutoInit && opt.Readme == "" {
opt.Readme = "Default"
}
repo, err := models.CreateRepository(ctx.User, owner, models.CreateRepoOptions{
Name: opt.Name,
Description: opt.Description,

Loading…
Cancel
Save