summaryrefslogtreecommitdiffstats
path: root/modules/context/repo.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-03-13 17:40:47 +0100
committerGitHub <noreply@github.com>2022-03-13 17:40:47 +0100
commitbc0d2c8ada14eae81542f30a81552ed5cef8bd5d (patch)
tree5242a9e288f53cfc04e56df495a048d02a902d91 /modules/context/repo.go
parent780cf76f6e930b5e92fd12ae1e729c5702e70afa (diff)
downloadgitea-bc0d2c8ada14eae81542f30a81552ed5cef8bd5d.tar.gz
gitea-bc0d2c8ada14eae81542f30a81552ed5cef8bd5d.zip
RSS/Atom support for Repos (#19055)
* support for repos * refactor * advertise the feeds via meta tags * allow feed suffix and feed header * optimize performance
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r--modules/context/repo.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 355c40af8a..e55c13f49c 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -418,6 +418,8 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
userName := ctx.Params(":username")
repoName := ctx.Params(":reponame")
repoName = strings.TrimSuffix(repoName, ".git")
+ repoName = strings.TrimSuffix(repoName, ".rss")
+ repoName = strings.TrimSuffix(repoName, ".atom")
// Check if the user is the same as the repository owner
if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) {