diff options
author | Roger Luo <rogerluo410@gmail.com> | 2022-06-09 19:15:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 14:15:08 +0300 |
commit | 2ae45cebbf2ec839bf2280765f958eb60d1f6374 (patch) | |
tree | 7e5a81f11ceebcbaf7c71cf9853a4c21fe28eeaf /routers/web/web.go | |
parent | 7948cb3149ab64484a8d4c6644f53f9f39accbef (diff) | |
download | gitea-2ae45cebbf2ec839bf2280765f958eb60d1f6374.tar.gz gitea-2ae45cebbf2ec839bf2280765f958eb60d1f6374.zip |
Feature: Find files in repo (#15028)
* Create finding files page ui in repo page
* Get tree entries for find repo files.
* Move find files JS to individual file.
* gen swagger.
* Add enry.IsVendor to exclude entries
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web/web.go')
-rw-r--r-- | routers/web/web.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index 3e837c62d0..bf4c4662af 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -831,6 +831,12 @@ func RegisterRoutes(m *web.Route) { m.Group("/milestone", func() { m.Get("/{id}", repo.MilestoneIssuesAndPulls) }, reqRepoIssuesOrPullsReader, context.RepoRef()) + m.Get("/find/*", repo.FindFiles) + m.Group("/tree-list", func() { + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.TreeList) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.TreeList) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.TreeList) + }) m.Get("/compare", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists, ignSignIn, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff) m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists). Get(ignSignIn, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff). |