Commit 7c1104b
Add pre-commit and pre-push git hooks (#1437)
* Add pre-commit hook for rubocop, brakeman, and safety checks
Runs on every commit:
- rubocop on staged .rb files only
- brakeman security scan
- checks for debug statements (binding.pry, byebug, etc.)
- checks for merge conflict markers
- blocks committing .env/secrets files
Hook is auto-installed via bin/setup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Move rubocop and brakeman to pre-push hook for faster commits
Pre-commit now only runs lightweight safety checks (debug statements,
conflict markers, secrets). Heavier tools run before push instead.
Also removes credentials.yml.enc from secrets blocklist since it's
meant to be committed (it's encrypted).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Allow .env.example through pre-commit secrets check
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5112f08 commit 7c1104b
3 files changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments