Skip to content

Commit 97a5d84

Browse files
committed
Git hooks cron job should not be disabled when DISABLE_GIT_HOOKS=true
Fixes: 6801919 Related: #18485 (review) Author-Change-Id: IB#1115251
1 parent 708319e commit 97a5d84

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

services/cron/tasks_extended.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ func initExtendedTasks() {
160160
registerGarbageCollectRepositories()
161161
registerRewriteAllPublicKeys()
162162
registerRewriteAllPrincipalKeys()
163-
if !setting.DisableGitHooks {
164-
registerRepositoryUpdateHook()
165-
}
163+
registerRepositoryUpdateHook()
166164
registerReinitMissingRepositories()
167165
registerDeleteMissingRepositories()
168166
registerRemoveRandomAvatars()

templates/admin/dashboard.tmpl

-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@
5252
<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>
5353
</tr>
5454
{{end}}
55-
{{if not DisableGitHooks}}
5655
<tr>
5756
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
5857
<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>
5958
</tr>
60-
{{end}}
6159
<tr>
6260
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
6361
<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>

0 commit comments

Comments
 (0)