2023-04-25 19:38:29 +05:30
|
|
|
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package feed
|
|
|
|
|
|
|
|
import (
|
|
|
|
"code.gitea.io/gitea/modules/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
// RenderBranchFeed render format for branch or file
|
2023-10-20 15:10:32 +05:30
|
|
|
func RenderBranchFeed(feedType string) func(ctx *context.Context) {
|
|
|
|
return func(ctx *context.Context) {
|
|
|
|
if ctx.Repo.TreePath == "" {
|
|
|
|
ShowBranchFeed(ctx, ctx.Repo.Repository, feedType)
|
|
|
|
} else {
|
|
|
|
ShowFileFeed(ctx, ctx.Repo.Repository, feedType)
|
|
|
|
}
|
2023-04-25 19:38:29 +05:30
|
|
|
}
|
|
|
|
}
|