mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-25 00:44:40 +00:00
CI - configure precommit hook to block commit when files from .claude… (#1149)
* CI - configure precommit hook to block commit when files from .claude/ and/or .vscode/ directories are staged * fix sanity issue - shebang * Remove local hook and update documentation
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -23,8 +23,9 @@ tests/integration/targets/*/*.tgz
|
||||
tests/integration/inventory
|
||||
tests/integration/*-*.yml
|
||||
|
||||
# VS Code settings
|
||||
# IDE and editor settings
|
||||
.vscode/
|
||||
.claude/
|
||||
|
||||
# Root coverage report for SonarCloud (generated locally or in CI)
|
||||
/coverage.xml
|
||||
|
||||
6
.pre-commit-config.yaml
Normal file
6
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/ansible/cloud-content-ci-automation
|
||||
rev: precommit_hook
|
||||
hooks:
|
||||
- id: block-ide-ai-files
|
||||
always_run: true
|
||||
@@ -66,6 +66,20 @@ After installation, you can update documentation
|
||||
|
||||
Review the changes and create a pull request using updated files.
|
||||
|
||||
### Pre-Commit Hooks
|
||||
|
||||
To prevent accidental commits of local configuration and IDE files (specifically `.vscode/` and `.claude/`), this repository utilizes the `pre-commit` framework.
|
||||
|
||||
Please set up the hooks locally before making your first commit:
|
||||
|
||||
```bash
|
||||
# Install the pre-commit tool
|
||||
pip install pre-commit
|
||||
|
||||
# Register the hooks with Git
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
### Code of Conduct
|
||||
The `kubernetes.core` collection follows the Ansible project's
|
||||
[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).
|
||||
|
||||
Reference in New Issue
Block a user