0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-17 20:27:10 +02:00

Merge 6a0b3e4bf9994989aeccdc513d37062a492b808e into 68692e19d40894cf0c036f986f659b7ed9b298f5

This commit is contained in:
Lunny Xiao 2026-06-18 01:13:55 +09:00 committed by GitHub
commit 006a718596
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,7 +149,7 @@ func GenerateRepository(ctx context.Context, doer, owner *user_model.User, templ
}
// Git Hooks
if opts.GitHooks {
if opts.GitHooks && doer.CanEditGitHook() {
if err = GenerateGitHooks(ctx, templateRepo, generateRepo); err != nil {
return nil, err
}