aboutsummaryrefslogtreecommitdiffstats
path: root/services/doctor
Commit message (Collapse)AuthorAgeFilesLines
* Fix oauth2 builtin application logic (#30304) (#30327)Giteabot2024-04-083-11/+79
| | | | | | | | | | Backport #30304 by wxiaoguang Fix #29074 (allow to disable all builtin apps) and don't make the doctor command remove the builtin apps. By the way, rename refobject and joincond to camel case. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix gitea doctor will remove repo-avatar files when execute command ↵yp053272024-03-261-1/+1
| | | | | `storage-archives` (#30094) Fix #30037
* Fix panic for `fixBrokenRepoUnits16961` (#30068)yp053272024-03-261-0/+6
| | | ![image](https://github.com/go-gitea/gitea/assets/18380374/508b3ceb-f53d-4d3b-a781-97c1542af1cb)
* Fix some pending problems (#29985)wxiaoguang2024-03-221-3/+3
| | | | | | | | | | | | | | | | | These changes are quite independent and trivial, so I don't want to open too many PRs. * https://github.com/go-gitea/gitea/pull/29882#discussion_r1529607091 * the `f.Close` should be called properly * the error message could be more meaningful (https://github.com/go-gitea/gitea/pull/29882#pullrequestreview-1942557935) * https://github.com/go-gitea/gitea/pull/29859#pullrequestreview-1942324716 * the new translation strings don't take arguments * https://github.com/go-gitea/gitea/pull/28710#discussion_r1443778807 * stale for long time * #28140 * a form was forgotten to be changed to work with backend code
* Fix missing error check of bufio.Scanner (#29882)coldWater2024-03-191-0/+4
| | | maybe more
* Move some asymkey functions to service layer (#28894)Lunny Xiao2024-03-041-2/+3
| | | | After the moving, all models will not depend on `util.Rename` so that I can do next step refactoring.
* Simplify how git repositories are opened (#28937)Lunny Xiao2024-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Purpose This is a refactor toward building an abstraction over managing git repositories. Afterwards, it does not matter anymore if they are stored on the local disk or somewhere remote. ## What this PR changes We used `git.OpenRepository` everywhere previously. Now, we should split them into two distinct functions: Firstly, there are temporary repositories which do not change: ```go git.OpenRepository(ctx, diskPath) ``` Gitea managed repositories having a record in the database in the `repository` table are moved into the new package `gitrepo`: ```go gitrepo.OpenRepository(ctx, repo_model.Repo) ``` Why is `repo_model.Repository` the second parameter instead of file path? Because then we can easily adapt our repository storage strategy. The repositories can be stored locally, however, they could just as well be stored on a remote server. ## Further changes in other PRs - A Git Command wrapper on package `gitrepo` could be created. i.e. `NewCommand(ctx, repo_model.Repository, commands...)`. `git.RunOpts{Dir: repo.RepoPath()}`, the directory should be empty before invoking this method and it can be filled in the function only. #28940 - Remove the `RepoPath()`/`WikiPath()` functions to reduce the possibility of mistakes. --------- Co-authored-by: delvh <dev.lh@web.de>
* Move doctor package from modules to services (#28856)Lunny Xiao2024-01-2017-0/+2386