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