gitea/models/issues
Lunny Xiao c53ad052d8
Refactor the setting to make unit test easier ()
Some bugs caused by less unit tests in fundamental packages. This PR
refactor `setting` package so that create a unit test will be easier
than before.

- All `LoadFromXXX` files has been splited as two functions, one is
`InitProviderFromXXX` and `LoadCommonSettings`. The first functions will
only include the code to create or new a ini file. The second function
will load common settings.
- It also renames all functions in setting from `newXXXService` to
`loadXXXSetting` or `loadXXXFrom` to make the function name less
confusing.
- Move `XORMLog` to `SQLLog` because it's a better name for that.

Maybe we should finally move these `loadXXXSetting` into the `XXXInit`
function? Any idea?

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
..
assignees.go Improve utils of slices ()
assignees_test.go refactor some functions to support ctx as first parameter ()
comment.go Rename `repo.GetOwner` to `repo.LoadOwner` ()
comment_code.go some refactor about code comments ()
comment_list.go Implement actions ()
comment_test.go Support importing comment types ()
content_history.go Implement FSFE REUSE for golang files ()
content_history_test.go Implement FSFE REUSE for golang files ()
dependency.go Implement FSFE REUSE for golang files ()
dependency_test.go refactor some functions to support ctx as first parameter ()
issue.go Scoped labels ()
issue_index.go Implement FSFE REUSE for golang files ()
issue_list.go Implement actions ()
issue_list_test.go Implement FSFE REUSE for golang files ()
issue_lock.go Rename almost all Ctx functions ()
issue_project.go Support org/user level projects ()
issue_test.go Scoped labels ()
issue_user.go Implement FSFE REUSE for golang files ()
issue_user_test.go Implement FSFE REUSE for golang files ()
issue_watch.go Implement FSFE REUSE for golang files ()
issue_watch_test.go Implement FSFE REUSE for golang files ()
issue_xref.go Fix more HTMLURL in templates ()
issue_xref_test.go Implement FSFE REUSE for golang files ()
label.go Scoped labels ()
label_test.go Scoped labels ()
main_test.go Refactor the setting to make unit test easier ()
milestone.go refactor some functions to support ctx as first parameter ()
milestone_test.go Implement FSFE REUSE for golang files ()
pull.go Rename `repo.GetOwner` to `repo.LoadOwner` ()
pull_list.go Set PR for issue when load attributes for PRs ()
pull_test.go Implement FSFE REUSE for golang files ()
reaction.go refactor some functions to support ctx as first parameter ()
reaction_test.go Implement FSFE REUSE for golang files ()
review.go Implement actions ()
review_test.go Restore previous official review when an official review is deleted ()
stopwatch.go Rename almost all Ctx functions ()
stopwatch_test.go refactor some functions to support ctx as first parameter ()
tracked_time.go Rename almost all Ctx functions ()
tracked_time_test.go refactor some functions to support ctx as first parameter ()