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:
parent
050fad97d6
commit
95bccdbc3b
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user