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