-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise server side hook configuration to support dynamic hook file extensions. #30985
Comments
How does these hooks with extensions work? https://git-scm.com/docs/githooks |
Hooks with extensions do work on Gitea, but currently, they do not appear on the frontend. It would be helpful to customize each hook's behavior without having to create a wrapper script that calls the script from bash. For example, if I wanted to create a pre-receive.ps1 script inside the repository on the server, Gitea would not find it since the hook names are hard-coded. Additionally, calling the script from bash with #!/usr/bin/env pwsh without a file extension won't work either, as since PowerShell 7.2 scripts require a .ps1 file extension on windows. |
I don't think so. Gitea will create |
Feature Description
In the /modules/git/hook.go file each hook is hardcoded without a file extension, causing inconvenience in deploying any script git hook other than bash on Gitea.
Within modules/git/hook.go, the variable "hookNames" is defined as an array without file extensions:
Screenshots
No response
The text was updated successfully, but these errors were encountered: