-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: configure the name of the checksums dir using env. var or git config #181
base: main
Are you sure you want to change the base?
feat: configure the name of the checksums dir using env. var or git config #181
Conversation
@victorciresica : Thats actually correct, it does not work.
Thanks for providing a PR -> Actually, its nice somebody uses this on Gitea, I once did that long ago too on a company instance. I will have look at the PR =) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but needs some changes and discussion.
@victorciresica I enabled CI for forked PRs, it might enable when you ammend the commit. |
I need to figure out next week why the CI is not running probably due to pipeline.yml which has some wrong settings. @victorciresica : You can run the tests with |
@gabyx I did the changes you suggested. It remains just to add update the readme as well. |
911d355
to
77869a8
Compare
@victorciresica : The question I have is; When you set a global checksums directory -> this directory could grow and nobody cleans that on Gitea, but you are right there are only a few deliberate hooks the server maintainer sets up so the directory containing the checksums will only be small and of limited size... Also you read that section right: trust all hooks on the Server: # Automatically accept changes to all existing and new
# hooks in the current repository.
# This makes the fatal trust prompt pass.
git hooks config trust-all-hooks --accept I would just leave the checksum directory local and not set it (rendering this PR actually obsolete ... I will still consider to merge it, since it actually is ok!) https://github.com/gabyx/Githooks/blob/main/docs/cli/git_hooks_shared_add.md
|
I did read the section on trust-all-hooks, but it can only be set locally, on one repo at a time. I would like something global. So, I think the feature is still useful. @gabyx what do you think? |
82b824f
to
bc79c9b
Compare
bc79c9b
to
d91a7bd
Compare
I was trying to set centralized server hooks for a gitea instance and I had a problem with having centralized trust configuration because if I create a symbolic link to .githooks.checksums in the gitea init.templateDir it isn't copied in new repos, because it's a hidden directory. So I figured a way to set the name of the checksums' directory would fix my issue.
I don't know if it is Gitea specific, or this might be the case for all git service providers(e.g. gitlab, bitbucket). If it isn't specific to Gitea it will be very useful for others as well.