Commit Graph
9 Commits
Author SHA1 Message Date
Lunny XiaoandGitHub e59c9e3ecd Fix yaml test (#27297) 2023-09-26 23:30:03 -04:00
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 <[email protected]>
2022-11-27 18:20:29 +00:00
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 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2022-11-19 16:12:33 +08:00
Lunny XiaoandGitHub cbd45471b1 Move access and repo permission to models/perm/access (#19350)
* Move access and repo permission to models/perm/access

* Remove unnecessary code
2022-05-11 12:09:36 +02:00
Lunny XiaoandGitHub 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
2021-12-10 09:27:50 +08:00
zeripathandGitHub 9302eba971 DBContext is just a Context (#17100)
* DBContext is just a Context

This PR removes some of the specialness from the DBContext and makes it context
This allows us to simplify the GetEngine code to wrap around any context in future
and means that we can change our loadRepo(e Engine) functions to simply take contexts.

Signed-off-by: Andrew Thornton <[email protected]>

* fix unit tests

Signed-off-by: Andrew Thornton <[email protected]>

* another place that needs to set the initial context

Signed-off-by: Andrew Thornton <[email protected]>

* avoid race

Signed-off-by: Andrew Thornton <[email protected]>

* change attachment error

Signed-off-by: Andrew Thornton <[email protected]>
2021-09-23 23:45:36 +08:00
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 <[email protected]>
2021-09-19 19:49:59 +08:00
Bo-Yi WuandGitHub 167b0f46ef chore(models): rewrite code format. (#14754)
* chore: rewrite format.

* chore: update format

Signed-off-by: Bo-Yi Wu <[email protected]>

* chore: update format

Signed-off-by: Bo-Yi Wu <[email protected]>

* chore: Adjacent parameters with the same type should be grouped together

* chore: update format.
2021-03-14 19:52:12 +01:00
7e920703f9 Move fixture generation to contrib and add test (#10277)
* Add fixture gen tool and fix "access" test

* Close file before exiting

* Add missing repo_unit for repo id: 5

* Fix count on TestAPIOrgRepos

* Generate access fixture from contrib and add test

* Remove old access fixture generation

* Fix lint

Co-authored-by: Lunny Xiao <[email protected]>
2020-02-15 10:59:43 +02:00