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