feat: delegate buildcheck and buildtest to global hooks when available#697
Merged
Conversation
If git config --global core.hooksPath is set and the hooks directory contains a matching executable script, exec it in place of the local implementation so a machine-wide installation takes precedence. Prompt: hey, buildcheck and buildtest... if the global pre-commit exists and has those scripts we should delegate to them rather than running out own Closes #696
Owner
Author
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Also checks git config --system core.hooksPath when the global hooks path does not contain the script, matching git's own config precedence (global before system). Prompt: can it pick the system git config --system and pick that path if it does too Closes #696
Prints the resolved path when delegating to global or system hooks, or "Using local <script>" when falling through to the local implementation. Prompt: can you do an info line if its using the pre-commit and another if local
Owner
Author
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
The global/system scripts live in <hooks_path>/../scripts/, not in the hooks dir itself. Derive the scripts dir as $(dirname <hooks_path>)/scripts so the delegation check finds them correctly. Prompt: it says its using local... but i know there's a global one... in the scripts/buildcheck folder?!?
Owner
Author
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
…em script Ensures buildcheck passes locally before handing off to the global or system buildtest script.
Owner
Author
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildcheckandbuildtestnow checkgit config --global core.hooksPathat startupexecdelegates to it instead of running local logicCloses #696
Test plan
core.hooksPathis not setcore.hooksPathpoints to a directory containingbuildcheck/buildtest