浏览代码

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

tags/v1.9.0-dev
John Olheiser 5 年前
父节点
当前提交
df30010dbd
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      routers/api/v1/repo/repo.go

+ 3
- 0
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,

正在加载...
取消
保存