follow 26257

This commit is contained in:
yp05327 2023-08-15 00:43:35 +00:00
parent aa2b8c4855
commit 5bfa11ba03
1 changed files with 8 additions and 4 deletions

View File

@ -991,10 +991,14 @@ func renderCode(ctx *context.Context) {
if ctx.Repo.Repository.IsFork {
opts.BaseRepo = ctx.Repo.Repository.BaseRepo
}
ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, opts)
if err != nil {
ctx.ServerError("FindRecentlyPushedNewBranches", err)
return
if !opts.Repo.IsMirror && !opts.BaseRepo.IsMirror &&
opts.BaseRepo.UnitEnabled(ctx, unit_model.TypePullRequests) {
ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, opts)
if err != nil {
ctx.ServerError("FindRecentlyPushedNewBranches", err)
return
}
}
}