mirror of
https://github.com/go-gitea/gitea
synced 2025-02-09 13:37:02 +01: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("*")
|
pathParam := ctx.PathParam("*")
|
||||||
baseRepo := ctx.Repo.Repository
|
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 {
|
if err != nil {
|
||||||
switch {
|
switch {
|
||||||
case user_model.IsErrUserNotExist(err):
|
case user_model.IsErrUserNotExist(err):
|
||||||
|
@ -402,7 +402,7 @@ func CreatePullRequest(ctx *context.APIContext) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Get repo/branch information
|
// 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 {
|
if err != nil {
|
||||||
switch {
|
switch {
|
||||||
case user_model.IsErrUserNotExist(err):
|
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>
|
// format: <base branch>...[<head repo>:]<head branch>
|
||||||
// base<-head: master...head:feature
|
// base<-head: master...head:feature
|
||||||
// same repo: master...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{}
|
ci := &CompareInfo{}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
|
|||||||
pathParam := ctx.PathParam("*")
|
pathParam := ctx.PathParam("*")
|
||||||
baseRepo := ctx.Repo.Repository
|
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 {
|
if err != nil {
|
||||||
switch {
|
switch {
|
||||||
case user_model.IsErrUserNotExist(err):
|
case user_model.IsErrUserNotExist(err):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user