feat(config): add BD_NO_INSTALL_HOOKS environment variable to disable git hook installation (#500)
* feat(config): add no-install-hooks config to disable git hook installation Add `no-install-hooks` boolean config that prevents git hook installation during `bd init`. This can be set via: - Environment variable: BD_NO_INSTALL_HOOKS=1 - Global config: ~/.config/bd/config.yaml with `no-install-hooks: true` - Local config: .beads/config.yaml with `no-install-hooks: true` The existing `--skip-hooks` flag continues to work and takes precedence. Default behavior unchanged: hooks install by default. * docs: add no-install-hooks to configuration documentation - Add no-install-hooks to Supported Settings table in CONFIG.md - Add example in config file section - Add "Disabling Hook Installation" section to GIT_INTEGRATION.md with examples for flag, env var, and config file methods
This commit is contained in:
@@ -251,11 +251,33 @@ See [PROTECTED_BRANCHES.md](PROTECTED_BRANCHES.md) for complete setup guide, tro
|
||||
|
||||
### Installation
|
||||
|
||||
Git hooks are installed automatically during `bd init`. To install manually:
|
||||
|
||||
```bash
|
||||
# One-time setup in each beads workspace
|
||||
./examples/git-hooks/install.sh
|
||||
```
|
||||
|
||||
### Disabling Hook Installation
|
||||
|
||||
If you prefer to manage git hooks separately (e.g., using pre-commit, husky, or your own hook manager), you can disable automatic hook installation:
|
||||
|
||||
```bash
|
||||
# Via command-line flag
|
||||
bd init --skip-hooks
|
||||
|
||||
# Via environment variable (useful for CI/scripts)
|
||||
BD_NO_INSTALL_HOOKS=1 bd init
|
||||
|
||||
# Via global config (~/.config/bd/config.yaml)
|
||||
no-install-hooks: true
|
||||
|
||||
# Via project config (.beads/config.yaml)
|
||||
no-install-hooks: true
|
||||
```
|
||||
|
||||
**Precedence:** `--skip-hooks` flag > `BD_NO_INSTALL_HOOKS` env var > config file > default (install hooks)
|
||||
|
||||
### What Gets Installed
|
||||
|
||||
**pre-commit hook:**
|
||||
|
||||
Reference in New Issue
Block a user