Lunny Xiao
9bb1adf8ea
Move some repository transfer functions to service layer ( #28855 )
10 months ago
JakobDev
f91dbbba98
Next round of `db.DefaultContext` refactor ( #27089 )
...
Part of #27065
1 year ago
Lunny Xiao
540bf9fa6d
Move notification interface to services layer ( #26915 )
...
Extract from #22266
1 year ago
Jason Song
04347eb810
Use context parameter in services/repository ( #23186 )
...
Use context parameter in `services/repository`.
And use `cache.WithCacheContext(ctx)` to generate push action history
feeds.
Fix #23160
2 years ago
yp05327
bd66fa586a
Rename `repo.GetOwner` to `repo.LoadOwner` ( #22967 )
...
Fixes https://github.com/go-gitea/gitea/issues/22963
---------
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
2 years ago
Lunny Xiao
68704532c2
Rename almost all Ctx functions ( #22071 )
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
KN4CK3R
044c754ea5
Add `context.Context` to more methods ( #21546 )
...
This PR adds a context parameter to a bunch of methods. Some helper
`xxxCtx()` methods got replaced with the normal name now.
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
Lunny Xiao
1d8543e7db
Move some files into models' sub packages ( #20262 )
...
* Move some files into models' sub packages
* Move functions
* merge main branch
* Fix check
* fix check
* Fix some tests
* Fix lint
* Fix lint
* Revert lint changes
* Fix error comments
* Fix lint
Co-authored-by: 6543 <6543@obermui.de>
2 years ago
Lunny Xiao
cbd45471b1
Move access and repo permission to models/perm/access ( #19350 )
...
* Move access and repo permission to models/perm/access
* Remove unnecessary code
3 years ago
6543
f034ee6cf0
PullService lock via pullID ( #19520 )
...
* lock pull on git&db actions ...
* add TODO notes
* rename prQueue 2 prPatchCheckerQueue
* fmt
3 years ago
Lunny Xiao
b06b9a056c
Move organization related structs into sub package ( #18518 )
...
* Move organization related structs into sub package
* Fix test
* Fix lint
* Move more functions into sub packages
* Fix bug
* Fix test
* Update models/organization/team_repo.go
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Apply suggestions from code review
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix fmt
* Follow suggestion from @Gusted
* Fix test
* Fix test
* Fix bug
* Use ctx but db.DefaultContext on routers
* Fix bug
* Fix bug
* fix bug
* Update models/organization/team_user.go
* Fix bug
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
3 years ago
Lunny Xiao
a6d4a8546a
Fix rename notification bug ( #18008 )
3 years ago
Lunny Xiao
5723240490
Some repository refactors ( #17950 )
...
* some repository refactors
* remove unnecessary code
* Fix test
* Remove unnecessary banner
3 years ago
Lunny Xiao
719bddcd76
Move repository model into models/repo ( #17933 )
...
* Some refactors related repository model
* Move more methods out of repository
* Move repository into models/repo
* Fix test
* Fix test
* some improvements
* Remove unnecessary function
3 years ago
Lunny Xiao
1fee11d69a
Move accessmode into models/perm ( #17828 )
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
Nils Dralle
f374789fe2
Fix private repo permission problem ( #16142 )
...
* Change user access permission
* Add string 'transfer_notices_3'
* Add 3rd transfer note to transfer dialog
* Add test
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
6543
a4148c0f12
Repository transfer has to be confirmed, if user can not create repo for new owner ( #14792 )
...
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination
* if new pending transfer ocured, create UI & Mail notifications
4 years ago
6543
a19447aed1
migrate from com.* to alternatives ( #14103 )
...
* remove github.com/unknwon/com from models
* dont use "com.ToStr()"
* replace "com.ToStr" with "fmt.Sprint" where its easy to do
* more refactor
* fix test
* just "proxy" Copy func for now
* as per @lunny
4 years ago
6543
13bc82009c
API endpoint for repo transfer ( #9947 )
...
* squash
* optimize
* fail before make any changes
* fix-header
5 years ago
Lunny Xiao
d32eac44b1
Move RepoWorkingPool to services/repository package ( #9754 )
...
* Move RepoWorkingPool to services/repository package
* Make repoWorkingPool private
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
5 years ago
Lunny Xiao
77730db257
Move repoWorkPool outside rename/transfer repository ( #9086 )
...
* Move repoWorkPool outside rename/transfer repository
* fix import
* Fix test
5 years ago
Lunny Xiao
21ae9838e0
Move transfer repository and rename repository on a service package and start action notification ( #8573 )
...
* move transfer repository and rename repository on a service package and start action notification
* remove unused codes
* fix lint
* fix bugs
* fix test
* fix test
* fix test
* fix lint
* update go mod and sum
5 years ago