Add rootRepo and ownForkRepo

This commit is contained in:
Lunny Xiao
2024-12-12 00:37:51 -08:00
parent 52639ffaa9
commit a3eb356f7a
5 changed files with 116 additions and 48 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ func CompareDiff(ctx *context.APIContext) {
pathParam := ctx.PathParam("*")
baseRepo := ctx.Repo.Repository
ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo)
ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo, ctx.Doer)
if err != nil {
switch {
case user_model.IsErrUserNotExist(err):
+1 -1
View File
@@ -403,7 +403,7 @@ func CreatePullRequest(ctx *context.APIContext) {
)
// Get repo/branch information
ci, err := common.ParseComparePathParams(ctx, form.Base+"..."+form.Head, repo, ctx.Repo.GitRepo)
ci, err := common.ParseComparePathParams(ctx, form.Base+"..."+form.Head, repo, ctx.Repo.GitRepo, ctx.Doer)
if err != nil {
switch {
case user_model.IsErrUserNotExist(err):