Skip to content

Commit

Permalink
Git hooks cron job should not be disabled when DISABLE_GIT_HOOKS=true
Browse files Browse the repository at this point in the history
Fixes: 6801919
Related: #18485 (review)
Author-Change-Id: IB#1115251
  • Loading branch information
pboguslawski committed Feb 2, 2022
1 parent 708319e commit 97a5d84
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions services/cron/tasks_extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ func initExtendedTasks() {
registerGarbageCollectRepositories()
registerRewriteAllPublicKeys()
registerRewriteAllPrincipalKeys()
if !setting.DisableGitHooks {
registerRepositoryUpdateHook()
}
registerRepositoryUpdateHook()
registerReinitMissingRepositories()
registerDeleteMissingRepositories()
registerRemoveRandomAvatars()
Expand Down
2 changes: 0 additions & 2 deletions templates/admin/dashboard.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
</tr>
{{end}}
{{if not DisableGitHooks}}
<tr>
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
<td><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
</tr>
{{end}}
<tr>
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
<td><button type="submit" class="ui green button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
Expand Down

0 comments on commit 97a5d84

Please sign in to comment.