mctools / dgcode

DGCode: the coding framework of the ESS Detector Group. For more information, refer to https://confluence.esss.lu.se/display/DGCODE/CodingFramework
Other
2 stars 1 forks source link

Revisit git hook installation #7

Closed tkittel closed 1 year ago

tkittel commented 1 year ago

In dgcode_fmwk/bootstrap.sh we invoke .githooks/hooks.py --install-hooks-mode. However, I am not 100% sure which of the clones will now get the hook installed, and the question is also if we should install it everywhere. Some users might want to commit huge files in their private repos, but we certainly want to guard against it in our common DG project repos.

tkittel commented 1 year ago

And actually, for expert-only repos like mctools/dgcode, we likely want to enable server-side hooks. I am not 100% sure how to do this, it might be we need to go to the model where no-one can push directly to shared branches (main+develop), and the checks will be enforced in a PR.

tkittel commented 1 year ago

Any ideas @MilanKlausz ?

tkittel commented 1 year ago

I am updating the local git hooks now, to allow for custom git hooks in all git repos (with dgcode_val + dgcode_projects + dgcode_private_projects + ncrystaldev all starting with a copy of dgcode_framework/.githooks). Btw @MilanKlausz, it looks like you messed up the symlinks in dgcode_framework/.githooks, and replaced them with actual files. I will fix.

tkittel commented 1 year ago

Ok, I think this is solved as far as the local git hooks are concerned. It will still eventually be nice to have something server side as well, but will close for now.