You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to support post-merge and other git hooks intended for local use on the gogs remote.
My use-case would be to run a git hook when a pull-request is merged.
This is part of the use case in #96 -- it's possible to run hooks when a user pushes to the repo's remote but not when gogs modifies the repo locally such when merging a pull request or modifying files in the web UI.
However, I don't believe these hooks are supported on bare repositories.
I tried manually adding post-commit and post-merge hooks to the gogs bare repo, and they did not run when editing files in the UI or merging pull-requests.
We could exec these hooks during these actions from the Web UI, but that would make the behavior non-standard.
If we write code to exec scripts in a non-standard way, we could name the files in a gogs namespace such as ./hooks/gogs-post-merge or ./hooks/gogs/post-commit
Description
It would be useful to support
post-merge
and other git hooks intended for local use on the gogs remote.My use-case would be to run a git hook when a pull-request is merged.
This is part of the use case in #96 -- it's possible to run hooks when a user pushes to the repo's remote but not when gogs modifies the repo locally such when merging a pull request or modifying files in the web UI.
post-commit
may be useful for resolving #4338.However, I don't believe these hooks are supported on bare repositories.
I tried manually adding
post-commit
andpost-merge
hooks to the gogs bare repo, and they did not run when editing files in the UI or merging pull-requests.We could exec these hooks during these actions from the Web UI, but that would make the behavior non-standard.
If we write code to exec scripts in a non-standard way, we could name the files in a gogs namespace such as
./hooks/gogs-post-merge
or./hooks/gogs/post-commit
cc: @unknwon / @xiayhub
The text was updated successfully, but these errors were encountered: