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