Lunny Xiao
352a2cae24
Performance improvements for pull request list API ( #30490 )
...
Fix #30483
---------
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: Giteabot <teabot@gitea.io>
6 months ago
Nanguan Lin
6a725b6f9c
Remove deadcode under models/issues ( #28536 )
...
Using the Go Official tool `golang.org/x/tools/cmd/deadcode@latest`
mentioned by [go blog](https://go.dev/blog/deadcode ).
Just use `deadcode .` in the project root folder and it gives a list of
unused functions. Though it has some false alarms.
This PR removes dead code detected in `models/issues`.
11 months ago
JakobDev
cc5df26680
Even more `db.DefaultContext` refactor ( #27352 )
...
Part of #27065
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
1 year ago
KN4CK3R
f1173d6879
Use more specific test methods ( #24265 )
...
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2 years ago
wxiaoguang
cfe3d6e9b5
Make more functions use ctx instead of db.DefaultContext ( #24068 )
...
Continue the "ctx refactoring" work.
There are still a lot db.DefaultContext, incorrect context could cause
database deadlock errors.
2 years ago
Lunny Xiao
0a7d3ff786
refactor some functions to support ctx as first parameter ( #21878 )
...
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Lauris BH <lauris@nix.lv>
2 years ago
flynnnnnnnnnn
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2 years ago
Lunny Xiao
1a9821f57a
Move issues related files into models/issues ( #19931 )
...
* Move access and repo permission to models/perm/access
* fix test
* fix git test
* Move functions sequence
* Some improvements per @KN4CK3R and @delvh
* Move issues related code to models/issues
* Move some issues related sub package
* Merge
* Fix test
* Fix test
* Fix test
* Fix test
* Rename some files
2 years ago
Lunny Xiao
fd7d83ace6
Move almost all functions' parameter db.Engine to context.Context ( #19748 )
...
* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
3 years ago
Lunny Xiao
a666829a37
Move user related model into models/user ( #17781 )
...
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
3 years ago
wxiaoguang
750a8465f5
A better go code formatter, and now `make fmt` can run in Windows ( #17684 )
...
* go build / format tools
* re-format imports
3 years ago
wxiaoguang
df64fa4865
Decouple unit test code from business code ( #17623 )
3 years ago
Lunny Xiao
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
KN4CK3R
3607f79d78
Fixed assert statements. ( #16089 )
4 years ago
Lunny Xiao
495d5e4329
Move more issue assignee code from models to issue service ( #8690 )
...
* Move more issue assignee code from models to issue service
* fix test
5 years ago