code.gitea.io/gitea@v1.21.7/routers/web/feed/render.go (about)

     1  // Copyright 2022 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package feed
     5  
     6  import (
     7  	"code.gitea.io/gitea/modules/context"
     8  )
     9  
    10  // RenderBranchFeed render format for branch or file
    11  func RenderBranchFeed(ctx *context.Context) {
    12  	_, _, showFeedType := GetFeedType(ctx.Params(":reponame"), ctx.Req)
    13  	if ctx.Repo.TreePath == "" {
    14  		ShowBranchFeed(ctx, ctx.Repo.Repository, showFeedType)
    15  	} else {
    16  		ShowFileFeed(ctx, ctx.Repo.Repository, showFeedType)
    17  	}
    18  }