Add repository setting to enable/disable health checks (#3607)

New Feature:
  * Repository struct field for IsFsckEnabled (default true of course)
  * Admin Settings section on repo options page, accessible only by
    admin users

Possible Enhancements:
  * There's no way to force running health checks on all repos
    regardless of their IsFsckEnabled setting. This would be useful if
    there were an admin API or dashboard button to run fsck immediately.

Issue: https://github.com/go-gitea/gitea/issues/1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
This commit is contained in:
Allen Wild 2018-03-27 10:13:20 -04:00 committed by Lunny Xiao
parent 321cc2a3d0
commit 15c6bb500b
7 changed files with 73 additions and 2 deletions

View file

@ -172,6 +172,8 @@ var migrations = []Migration{
NewMigration("add label descriptions", addLabelsDescriptions),
// v59 -> v60
NewMigration("add merge whitelist for protected branches", addProtectedBranchMergeWhitelist),
// v60 -> v61
NewMigration("add is_fsck_enabled column for repos", addFsckEnabledToRepo),
}
// Migrate database to current version