diff --git a/routers/api/v1/repo/compare.go b/routers/api/v1/repo/compare.go index dae9a19bd8..56e00db943 100644 --- a/routers/api/v1/repo/compare.go +++ b/routers/api/v1/repo/compare.go @@ -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, ctx.Doer) + ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo) if err != nil { switch { case user_model.IsErrUserNotExist(err): diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 324e7d3725..ffd651ec0b 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -402,7 +402,7 @@ func CreatePullRequest(ctx *context.APIContext) { ) // Get repo/branch information - ci, err := common.ParseComparePathParams(ctx, form.Base+"..."+form.Head, repo, ctx.Repo.GitRepo, ctx.Doer) + ci, err := common.ParseComparePathParams(ctx, form.Base+"..."+form.Head, repo, ctx.Repo.GitRepo) if err != nil { switch { case user_model.IsErrUserNotExist(err): diff --git a/routers/common/compare.go b/routers/common/compare.go index 2f5edf635d..1bbd9f35fd 100644 --- a/routers/common/compare.go +++ b/routers/common/compare.go @@ -231,7 +231,7 @@ func getRootRepo(ctx context.Context, repo *repo_model.Repository) (*repo_model. // format: ...[:] // base<-head: master...head:feature // same repo: master...feature -func ParseComparePathParams(ctx context.Context, pathParam string, baseRepo *repo_model.Repository, baseGitRepo *git.Repository, doer *user_model.User) (*CompareInfo, error) { +func ParseComparePathParams(ctx context.Context, pathParam string, baseRepo *repo_model.Repository, baseGitRepo *git.Repository) (*CompareInfo, error) { ci := &CompareInfo{} var err error diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 99e10b4124..2bdc6dcc82 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -194,7 +194,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo { pathParam := ctx.PathParam("*") baseRepo := ctx.Repo.Repository - ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo, ctx.Doer) + ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo) if err != nil { switch { case user_model.IsErrUserNotExist(err):