aboutsummaryrefslogtreecommitdiffstats
path: root/modules/doctor/breaking.go
Commit message (Collapse)AuthorAgeFilesLines
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | 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>
* Merge db.Iterate and IterateObjects (#21641)Lunny Xiao2022-10-311-3/+2
| | | These two functions are similiar, merge them.
* Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551)delvh2022-10-241-2/+2
| | | | | | | | | Found using `find . -type f -name '*.go' -print -exec vim {} -c ':%s/fmt\.Errorf(\(.*\)%v\(.*\)err/fmt.Errorf(\1%w\2err/g' -c ':wq' \;` Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various typos (#20338)luzpaz2022-07-121-2/+2
| | | | | | | * Fix various typos Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon` Co-authored-by: zeripath <art27@cantab.net>
* Add username check to doctor (#20140)Gusted2022-06-271-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | * Add username check to doctor - Add a new breaking change detector to Gitea's doctor, which checks if all users still have a valid username according to Gitea. Given from time-to-time we need to make changes, either due to new routes or due to security, it's for a instance's admin to check if all users still have a valid username. * Fix extra argument * Apply suggestions from code review Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be> * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: delvh <dev.lh@web.de>
* Add breaking email restrictions checker in doctor (#19903)Gusted2022-06-071-0/+69
* Add breaking change check in doctor - This patch introduces a new kind of doctor type, breaking. This file is made to register checks that helps with detecting when a breaking change might impact a Gitea instance. - For now the only check here(and the reason of creating this) is to check if all users in the database has a valid email address, which might not be the case after https://github.com/go-gitea/gitea/pull/17688. This _simply_ uses the validation function to detect and report these cases. - Helps admins with detecting #19897. - I have no clue which priority should be and IsDefault is true, because when breaking change happen and we have a doctor check for it, we can say "run `gitea doctor` to help you with this and maybe you find other errors :wink:". * Makes no sense tbh * Fix copyright * Update modules/doctor/breaking.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>