Skip to content

Commit 550437d

Browse files
committed
fix comment
1 parent 580ea4b commit 550437d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

routers/web/repo/actions/actions.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ func prepareWorkflowDispatchTemplate(ctx *context.Context, workflowInfos []Workf
232232
ctx.ServerError("FindBranchNames", err)
233233
return
234234
}
235-
// always put default branch on the top if it exists
236-
if slices.Contains(branches, ctx.Repo.Repository.DefaultBranch) {
237-
branches = util.SliceRemoveAll(branches, ctx.Repo.Repository.DefaultBranch)
238-
branches = append([]string{ctx.Repo.Repository.DefaultBranch}, branches...)
239-
}
235+
// always put default branch on the top
236+
branches = util.SliceRemoveAll(branches, ctx.Repo.Repository.DefaultBranch)
237+
branches = append([]string{ctx.Repo.Repository.DefaultBranch}, branches...)
240238
ctx.Data["Branches"] = branches
241239

242240
tags, err := repo_model.GetTagNamesByRepoID(ctx, ctx.Repo.Repository.ID)

0 commit comments

Comments
 (0)