diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/fork.go | 6 | ||||
-rw-r--r-- | routers/web/repo/pull.go | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/routers/api/v1/repo/fork.go b/routers/api/v1/repo/fork.go index a3f9aa14f9..b3504faad9 100644 --- a/routers/api/v1/repo/fork.go +++ b/routers/api/v1/repo/fork.go @@ -123,7 +123,11 @@ func CreateFork(ctx *context.APIContext) { forker = org } - fork, err := repo_service.ForkRepository(ctx.User, forker, repo, repo.Name, repo.Description) + fork, err := repo_service.ForkRepository(ctx.User, forker, models.ForkRepoOptions{ + BaseRepo: repo, + Name: repo.Name, + Description: repo.Description, + }) if err != nil { ctx.Error(http.StatusInternalServerError, "ForkRepository", err) return diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 2fa5ab9186..a41c9eb2b4 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -225,7 +225,11 @@ func ForkPost(ctx *context.Context) { } } - repo, err := repo_service.ForkRepository(ctx.User, ctxUser, forkRepo, form.RepoName, form.Description) + repo, err := repo_service.ForkRepository(ctx.User, ctxUser, models.ForkRepoOptions{ + BaseRepo: forkRepo, + Name: form.RepoName, + Description: form.Description, + }) if err != nil { ctx.Data["Err_RepoName"] = true switch { |