Skip to content

Add repo-managed git hooks for local validation#555

Merged
enoodle merged 5 commits into
ai-dynamo:mainfrom
enoodle:erez/add-githooks
May 7, 2026
Merged

Add repo-managed git hooks for local validation#555
enoodle merged 5 commits into
ai-dynamo:mainfrom
enoodle:erez/add-githooks

Conversation

@enoodle

@enoodle enoodle commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Adds tracked Git hooks for local validation and Make targets to manage them locally.

  • adds .githooks/pre-commit to run make validate
  • adds .githooks/pre-push to run make test
  • adds make install-hooks to set core.hooksPath to .githooks
  • adds make uninstall-hooks to remove the local hook configuration
  • splits the shared validation steps into make validate, while keeping make check as validate plus the clean-tree assertion

This keeps the hook logic versioned in the repository and aligned with the existing Make-based validation flow.

Which issue(s) this PR fixes:

Fixes #554

Special notes for your reviewer:

The hooks are intentionally opt-in per clone.

make validate runs the same validation steps as make check without the final dirty-tree assertion, so generated or formatted changes can still be staged as part of a normal local workflow.

Does this PR introduce a API change?

NONE

Additional documentation e.g., enhancement proposals, usage docs, etc.:

NONE

@copy-pr-bot

copy-pr-bot Bot commented Apr 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

danbar2
danbar2 previously approved these changes Apr 27, 2026

@gflarity gflarity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor things.

Comment thread .githooks/pre-commit Outdated
Comment thread .githooks/pre-commit Outdated
Comment thread .githooks/pre-push Outdated
Comment thread Makefile
gflarity
gflarity previously approved these changes May 4, 2026
renormalize
renormalize previously approved these changes May 5, 2026
Comment thread .githooks/pre-commit Outdated
Comment thread .githooks/pre-push Outdated
enoodle added 4 commits May 6, 2026 12:10
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
@enoodle enoodle dismissed stale reviews from renormalize, gflarity, and danbar2 via eef60e9 May 6, 2026 10:12
@enoodle enoodle force-pushed the erez/add-githooks branch from 173c52f to eef60e9 Compare May 6, 2026 10:12
@enoodle enoodle merged commit 3acb0d2 into ai-dynamo:main May 7, 2026
14 checks passed
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.

Add repo-managed git hooks for local validation

4 participants