#205 Re-enable Git Hooks

Open
opened 1 week ago by Chase · 1 comments
Chase commented 1 week ago

Not sure why they were disabled, although im sure they could be nefarious. Would help making mirrors like from LinuxCafeFederation/awesome-alternatives#7 work again since we can use a post receive hook to send a git --mirror command over.

Not sure why they were disabled, although im sure they could be nefarious. Would help making mirrors like from LinuxCafeFederation/awesome-alternatives#7 work again since we can use a post receive hook to send a git --mirror command over.
hw commented 1 week ago
Owner

Not sure what you mean, it might either be:

  • server-side git hooks, which are heavily used internally by gitea’s implementation and only accessible in the UI for root accounts. They not a user-facing feature for obvious reasons (as otherwise any user could execute arbitrary code on the server which is usually not considered a good idea),
  • Webhooks which are definitely working for every user. These can be used for example to implement an action trigger, CI, ... for documentation see https://docs.gitea.io/en-us/webhooks/.

Which one did you have in mind?

Calling git --mirror makes most sense in a client-side hook, like for example pre-push?

Alternatively defining+registering a custom git subcommand or shell alias?

Not sure what you mean, it might either be: - server-side git hooks, which are heavily used internally by gitea's implementation and only accessible in the UI for root accounts. They not a user-facing feature for obvious reasons (as otherwise any user could execute arbitrary code on the server which is usually not considered a good idea), - Webhooks which are definitely working for every user. These can be used for example to implement an action trigger, CI, ... for documentation see https://docs.gitea.io/en-us/webhooks/. Which one did you have in mind? Calling `git --mirror` makes most sense in a client-side hook, like for example `pre-push`? Alternatively defining+registering a custom git subcommand or shell alias?
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.