mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-22 01:34:18 +00:00
Search branches (#27055)
Resolve #25233 <img width="1315" alt="图片" src="3ba59b58
-471a-4e1b-985c-87edac2268c0"> <img width="1297" alt="图片" src="b6caa12f
-323b-4f70-9c44-ef91cb71a26c">
This commit is contained in:
parent
dcf4b9e314
commit
47b878858a
5 changed files with 24 additions and 4 deletions
|
@ -51,7 +51,9 @@ func Branches(ctx *context.Context) {
|
|||
}
|
||||
pageSize := setting.Git.BranchesRangeSize
|
||||
|
||||
defaultBranch, branches, branchesCount, err := repo_service.LoadBranches(ctx, ctx.Repo.Repository, ctx.Repo.GitRepo, util.OptionalBoolNone, page, pageSize)
|
||||
kw := ctx.FormString("q")
|
||||
|
||||
defaultBranch, branches, branchesCount, err := repo_service.LoadBranches(ctx, ctx.Repo.Repository, ctx.Repo.GitRepo, util.OptionalBoolNone, kw, page, pageSize)
|
||||
if err != nil {
|
||||
ctx.ServerError("LoadBranches", err)
|
||||
return
|
||||
|
@ -73,6 +75,7 @@ func Branches(ctx *context.Context) {
|
|||
commitStatus[commitID] = git_model.CalcCommitStatus(cs)
|
||||
}
|
||||
|
||||
ctx.Data["Keyword"] = kw
|
||||
ctx.Data["Branches"] = branches
|
||||
ctx.Data["CommitStatus"] = commitStatus
|
||||
ctx.Data["CommitStatuses"] = commitStatuses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue