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>
此提交包含在:
Lunny Xiao
2023-07-10 11:18:55 +00:00
提交者 GitHub
co-authored by Giteabot
父節點 0fd1672ae4
當前提交 2f31d2d56c
共有 2 個檔案被更改,包括 4 行新增2 行删除
+1 -1
查看文件
@@ -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