diff options
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r-- | routers/web/repo/pull.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 682bc64ca2..bea6bfe433 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -78,7 +78,7 @@ var pullRequestTemplateCandidates = []string{ } func getRepository(ctx *context.Context, repoID int64) *repo_model.Repository { - repo, err := repo_model.GetRepositoryByID(repoID) + repo, err := repo_model.GetRepositoryByID(ctx, repoID) if err != nil { if repo_model.IsErrRepoNotExist(err) { ctx.NotFound("GetRepositoryByID", nil) @@ -159,7 +159,7 @@ func getForkRepository(ctx *context.Context) *repo_model.Repository { if !traverseParentRepo.IsFork { break } - traverseParentRepo, err = repo_model.GetRepositoryByID(traverseParentRepo.ForkID) + traverseParentRepo, err = repo_model.GetRepositoryByID(ctx, traverseParentRepo.ForkID) if err != nil { ctx.ServerError("GetRepositoryByID", err) return nil @@ -227,7 +227,7 @@ func ForkPost(ctx *context.Context) { if !traverseParentRepo.IsFork { break } - traverseParentRepo, err = repo_model.GetRepositoryByID(traverseParentRepo.ForkID) + traverseParentRepo, err = repo_model.GetRepositoryByID(ctx, traverseParentRepo.ForkID) if err != nil { ctx.ServerError("GetRepositoryByID", err) return @@ -427,7 +427,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C setMergeTarget(ctx, pull) - if err := pull.LoadProtectedBranch(); err != nil { + if err := pull.LoadProtectedBranch(ctx); err != nil { ctx.ServerError("LoadProtectedBranch", err) return nil } @@ -739,7 +739,7 @@ func ViewPullFiles(ctx *context.Context) { return } - if err = pull.LoadProtectedBranch(); err != nil { + if err = pull.LoadProtectedBranch(ctx); err != nil { ctx.ServerError("LoadProtectedBranch", err) return } |