1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Exclude default branch from pushed branch hint (#25795)

When pushing to default branch, no pushing hint should be prompt.
Fix #25778

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Lunny Xiao
2023-07-10 19:18:55 +08:00
committed by GitHub
parent 0fd1672ae4
commit 2f31d2d56c
2 changed files with 4 additions and 2 deletions

View File

@@ -982,7 +982,7 @@ func renderCode(ctx *context.Context) {
ctx.ServerError("GetBaseRepo", err)
return
}
ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Repo.Repository.ID, ctx.Doer.ID)
ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Repo.Repository.ID, ctx.Doer.ID, ctx.Repo.Repository.DefaultBranch)
if err != nil {
ctx.ServerError("GetRecentlyPushedBranches", err)
return