1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-01-19 14:03:40 +03:00

remove unnecessary parameter

This commit is contained in:
Lunny Xiao 2024-12-12 15:08:58 -08:00
parent 050fad97d6
commit 95bccdbc3b
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
4 changed files with 4 additions and 4 deletions

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, ctx.Doer)
ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo)
if err != nil {
switch {
case user_model.IsErrUserNotExist(err):

View File

@ -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):

View File

@ -231,7 +231,7 @@ func getRootRepo(ctx context.Context, repo *repo_model.Repository) (*repo_model.
// format: <base branch>...[<head repo>:]<head branch>
// 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

View File

@ -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):