gitea/routers/web/repo
wxiaoguang 65f17bfc31
Refactor legacy `unknwon/com` package, improve golangci lint ()
The main purpose is to refactor the legacy `unknwon/com` package.
1. Remove most imports of `unknwon/com`, only `util/legacy.go` imports the legacy `unknwon/com`
2. Use golangci's depguard to process denied packages
3. Fix some incorrect values in golangci.yml, eg, the version should be quoted string `"1.18"`
4. Use correctly escaped content for `go-import` and `go-source` meta tags
5. Refactor `com.Expand` to our stable (and the same fast) `vars.Expand`, our `vars.Expand` can still return partially rendered content even if the template is not good (eg: key mistach).
..
activity.go Propagate context and ensure git commands run in request context ()
attachment.go Renamed ctx.User to ctx.Doer. ()
blame.go Refactor i18n, use Locale to provide i18n/translation related functions ()
branch.go Make git.OpenRepository accept Context ()
cherry_pick.go Renamed ctx.User to ctx.Doer. ()
commit.go Make git.OpenRepository accept Context ()
compare.go Make git.OpenRepository accept Context ()
download.go format with gofumpt ()
editor.go Update HTTP status codes to modern codes ()
editor_test.go Make git.OpenRepository accept Context ()
http.go Remove `git.Command.Run` and `git.Command.RunInDir*` ()
http_test.go Fix http path bug ()
issue.go Refactor legacy `unknwon/com` package, improve golangci lint ()
issue_content_history.go Use `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) ()
issue_dependency.go Update HTTP status codes to modern codes ()
issue_label.go Move some issue methods as functions ()
issue_label_test.go Update HTTP status codes to modern codes ()
issue_lock.go Update HTTP status codes to modern codes ()
issue_stopwatch.go Renamed ctx.User to ctx.Doer. ()
issue_test.go format with gofumpt ()
issue_timetrack.go Renamed ctx.User to ctx.Doer. ()
issue_watch.go Update HTTP status codes to modern codes ()
lfs.go Make git.OpenRepository accept Context ()
main_test.go Decouple unit test code from business code ()
middlewares.go Renamed ctx.User to ctx.Doer. ()
migrate.go Use a more general (and faster) method to sanitize URLs with credentials ()
milestone.go Only view milestones from current repo ()
packages.go Add Package Registry ()
patch.go Renamed ctx.User to ctx.Doer. ()
projects.go Move project files into models/project sub package ()
projects_test.go Decouple unit test code from business code ()
pull.go Remove `git.Command.Run` and `git.Command.RunInDir*` ()
pull_review.go Renamed ctx.User to ctx.Doer. ()
release.go Renamed ctx.User to ctx.Doer. ()
release_test.go Decouple unit test, remove intermediate `unittestbridge` package ()
repo.go Move init repository related functions to modules ()
search.go Update HTTP status codes to modern codes ()
setting.go Move organization related structs into sub package ()
setting_protected_branch.go Move organization related structs into sub package ()
settings_test.go Move organization related structs into sub package ()
tag.go Move organization related structs into sub package ()
topic.go Renamed ctx.User to ctx.Doer. ()
view.go Use `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) ()
webhook.go Add Package Registry ()
wiki.go Make git.OpenRepository accept Context ()
wiki_test.go Make git.OpenRepository accept Context ()