rycus86 / githooks

Githooks: per-repo and global Git hooks with version control
MIT License
380 stars 19 forks source link

User feedback #123

Closed gabyx closed 3 years ago

gabyx commented 3 years ago

I recently had a conversation with someone who needed assistance with setting up hooks on gitea: I thought about sharing his feedback with all of the contributors here:

We were finally able to set up our workflow as below: 1) Create a repository just for server side hooks (hooks-repo) 2) Actual codebase repo (source-code-repo) with only client side hooks. In the server, I used git hooks shared --local on the bare repo. 3) As a part of the pre-receive hook on the hooks repo, we are running the "git hooks shared update" command Everything worked like a breeze. This library is awesome and thanks for contributing/maintaining it. Do let me know if I can contribute in any way.

Thanks and Regards, Nithin Gunasekaran.

gabyx commented 3 years ago

@Nithin Gunasekaran: thanks for the compliment and great that it worked out for gitea.

nithin001 commented 3 years ago

@gabyx, since both the repositories resided in the same server, it worked for us. The intention was to not have any server side hooks configured on the code-base-repo. It's great that you already have a PR solves that issue as well!

gabyx commented 3 years ago

Ah, because you directly use a local path right? something like git hooks shared --local /data/git/repositories/hooks.git In #119 , local paths will be forbidden in .githooks/.shared (the git hooks shared --local) and #125 will introduce local/global shared hooks through the Git config as well as shared hooks trough the .shared file. So once this is contributed you need eventually to move the entry from .githooks/.shared to the git config --local githooks.shared variable. But more on that later.

gabyx commented 3 years ago

@nithin001 See latest changes and githooks.sharedHooksUpdateTriggers you can set.