mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
Merge branch 'main' into lunny/issue_dev
This commit is contained in:
+8
-7
@@ -1178,6 +1178,7 @@ func registerRoutes(m *web.Router) {
|
||||
})
|
||||
})
|
||||
}, context.RepoRef())
|
||||
m.Get("/issues/suggestions", repo.IssueSuggestions)
|
||||
}, ignSignIn, context.RepoAssignment, reqRepoIssuesOrPullsReader)
|
||||
// end "/{username}/{reponame}": view milestone, label, issue, pull, etc
|
||||
|
||||
@@ -1207,7 +1208,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Group("/{index}", func() {
|
||||
m.Post("/title", repo.UpdateIssueTitle)
|
||||
m.Post("/content", repo.UpdateIssueContent)
|
||||
m.Post("/deadline", web.Bind(structs.EditDeadlineOption{}), repo.UpdateIssueDeadline)
|
||||
m.Post("/deadline", repo.UpdateIssueDeadline)
|
||||
m.Post("/watch", repo.IssueWatch)
|
||||
m.Post("/ref", repo.UpdateIssueRef)
|
||||
m.Post("/pin", reqRepoAdmin, repo.IssuePinOrUnpin)
|
||||
@@ -1323,7 +1324,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get(".rss", feedEnabled, repo.TagsListFeedRSS)
|
||||
m.Get(".atom", feedEnabled, repo.TagsListFeedAtom)
|
||||
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
|
||||
repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, true))
|
||||
repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, context.RepoRefByTypeOptions{IgnoreNotExistErr: true}))
|
||||
m.Post("/tags/delete", repo.DeleteTag, reqSignIn,
|
||||
repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoCodeWriter, context.RepoRef())
|
||||
}, ignSignIn, context.RepoAssignment, reqRepoCodeReader)
|
||||
@@ -1337,7 +1338,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get(".rss", feedEnabled, repo.ReleasesFeedRSS)
|
||||
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
|
||||
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
|
||||
repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, true))
|
||||
repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, context.RepoRefByTypeOptions{IgnoreNotExistErr: true}))
|
||||
m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, repo.GetAttachment)
|
||||
m.Get("/releases/download/{vTag}/{fileName}", repo.MustBeNotEmpty, repo.RedirectDownload)
|
||||
m.Group("/releases", func() {
|
||||
@@ -1535,7 +1536,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.SingleDownloadOrLFS)
|
||||
m.Get("/blob/{sha}", context.RepoRefByType(context.RepoRefBlob), repo.DownloadByIDOrLFS)
|
||||
// "/*" route is deprecated, and kept for backward compatibility
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.SingleDownloadOrLFS)
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefUnknown), repo.SingleDownloadOrLFS)
|
||||
}, repo.MustBeNotEmpty)
|
||||
|
||||
m.Group("/raw", func() {
|
||||
@@ -1544,7 +1545,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.SingleDownload)
|
||||
m.Get("/blob/{sha}", context.RepoRefByType(context.RepoRefBlob), repo.DownloadByID)
|
||||
// "/*" route is deprecated, and kept for backward compatibility
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.SingleDownload)
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefUnknown), repo.SingleDownload)
|
||||
}, repo.MustBeNotEmpty)
|
||||
|
||||
m.Group("/render", func() {
|
||||
@@ -1559,7 +1560,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefCommits)
|
||||
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.RefCommits)
|
||||
// "/*" route is deprecated, and kept for backward compatibility
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.RefCommits)
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefUnknown), repo.RefCommits)
|
||||
}, repo.MustBeNotEmpty)
|
||||
|
||||
m.Group("/blame", func() {
|
||||
@@ -1582,7 +1583,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home)
|
||||
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home)
|
||||
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home)
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) // "/*" route is deprecated, and kept for backward compatibility
|
||||
m.Get("/*", context.RepoRefByType(context.RepoRefUnknown), repo.Home) // "/*" route is deprecated, and kept for backward compatibility
|
||||
}, repo.SetEditorconfigIfExists)
|
||||
|
||||
m.Get("/forks", context.RepoRef(), repo.Forks)
|
||||
|
||||
Reference in New Issue
Block a user