Skip to content

chore(githooks): skip hooks in CI environments#139

Merged
jfrench9 merged 1 commit into
mainfrom
chore/skip-githooks-in-ci
Jul 14, 2026
Merged

chore(githooks): skip hooks in CI environments#139
jfrench9 merged 1 commit into
mainfrom
chore/skip-githooks-in-ci

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Problem

The local git hooks in .githooks/ (activated via core.hooksPath) fire inside CI. create-release.yml commits a version bump and pushes to main / release/*; when the hooks are active on the runner:

  • pre-commit runs dev-only checks (e.g. uvx cfn-lint) that are not installed in CI, so the commit fails.
  • pre-push blocks pushes to main / release/*, so the release push fails.

Fix

Skip both hooks when the CI environment variable is set (GitHub Actions always exports CI=true; it is unset in local shells). In CI these checks already run in dedicated jobs and GitHub branch protection is the server-side backstop, so the local hooks are redundant there. Local developer protection is unchanged.

Repo status: LATENT: hooks present and release pushes to main/release, but CI does not currently activate hooks (preventive)
Part of a fleet-wide fix across all repositories carrying these hooks.

@jfrench9 jfrench9 merged commit 5e67423 into main Jul 14, 2026
1 check passed
@jfrench9 jfrench9 deleted the chore/skip-githooks-in-ci branch July 14, 2026 08:37
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.

1 participant