2023-04-25 22:08:29 +08:00
|
|
|
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package feed
|
|
|
|
|
|
|
|
import (
|
2024-02-27 15:12:22 +08:00
|
|
|
"code.gitea.io/gitea/services/context"
|
2023-04-25 22:08:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// RenderBranchFeed render format for branch or file
|
|
|
|
func RenderBranchFeed(ctx *context.Context) {
|
2024-06-19 06:32:45 +08:00
|
|
|
_, _, showFeedType := GetFeedType(ctx.PathParam(":reponame"), ctx.Req)
|
2023-04-26 10:53:44 +08:00
|
|
|
if ctx.Repo.TreePath == "" {
|
|
|
|
ShowBranchFeed(ctx, ctx.Repo.Repository, showFeedType)
|
|
|
|
} else {
|
|
|
|
ShowFileFeed(ctx, ctx.Repo.Repository, showFeedType)
|
2023-04-25 22:08:29 +08:00
|
|
|
}
|
|
|
|
}
|