Skip to content

feat: delegate buildcheck and buildtest to global hooks when available#697

Merged
credfeto merged 5 commits into
mainfrom
feature/696-delegate-to-global-hooks
Jun 19, 2026
Merged

feat: delegate buildcheck and buildtest to global hooks when available#697
credfeto merged 5 commits into
mainfrom
feature/696-delegate-to-global-hooks

Conversation

@credfeto

Copy link
Copy Markdown
Owner

Summary

  • buildcheck and buildtest now check git config --global core.hooksPath at startup
  • If the path is set and the hooks directory contains a matching executable script, exec delegates to it instead of running local logic
  • Falls through to the existing implementation when no global override is present

Closes #696

Test plan

  • Verify scripts still work normally when core.hooksPath is not set
  • Verify scripts delegate correctly when core.hooksPath points to a directory containing buildcheck/buildtest

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
@credfeto credfeto self-assigned this Jun 19, 2026
@credfeto

Copy link
Copy Markdown
Owner Author

Super-linter summary

Language Validation result
BASH Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

credfeto added 2 commits June 19, 2026 16:36
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
@credfeto

Copy link
Copy Markdown
Owner Author

Super-linter summary

Language Validation result
BASH Pass ✅

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?!?
@credfeto

Copy link
Copy Markdown
Owner Author

Super-linter summary

Language Validation result
BASH Pass ✅

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.
@credfeto

Copy link
Copy Markdown
Owner Author

Super-linter summary

Language Validation result
BASH Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@credfeto credfeto enabled auto-merge June 19, 2026 15:53
@credfeto credfeto disabled auto-merge June 19, 2026 15:54
@credfeto credfeto merged commit 82e65fc into main Jun 19, 2026
24 of 25 checks passed
@credfeto credfeto deleted the feature/696-delegate-to-global-hooks branch June 19, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: buildcheck and buildtest should delegate to global pre-commit hook scripts when available

1 participant