Skip to content

feat(ci): add pre-push hook to prevent direct pushes to protected branches - #7

Merged
SHcommit merged 3 commits into
developfrom
feature/add-githooks
Sep 1, 2026
Merged

feat(ci): add pre-push hook to prevent direct pushes to protected branches#7
SHcommit merged 3 commits into
developfrom
feature/add-githooks

Conversation

@SHcommit

@SHcommit SHcommit commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds .githooks/pre-push script configured via git config core.hooksPath .githooks to block direct local git push attempts to protected branches (develop, master).
  • Directs contributors to create feature/fix branches and open Pull Requests.

ADR Impact

  • Checked ADR impact.

Verification

  • Tested pre-push hook locally against direct push attempts (correctly blocked with ❌ [Direct Push Blocked]).
  • Tested feature branch push (git push origin feature/add-githooks).
  • python3 -m pytest -q passed (396 passed).
  • python3 scripts/verify_examples.py --check passed.
  • python3 scripts/sync_version.py --check passed.

@SHcommit
SHcommit merged commit 47086c6 into develop Sep 1, 2026
9 checks passed
@SHcommit
SHcommit deleted the feature/add-githooks branch September 1, 2026 01:25
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