Commit 1fb817e
committed
fix(hooks): limit pre-push AI attribution check to commits since latest release
Only check commits after the latest published release tag instead of scanning
entire history. This prevents false positives from old commits with AI
attribution that are already on origin/main from merged PRs.
Changes:
- Find latest v* tag merged into branch being pushed
- Only scan commits after that tag
- Fall back to full history if no release tags exist
- Applies to both new branches and existing branches
Benefits:
- No false positives from historical commits
- Faster push validation
- Still blocks new AI attribution in unpublished code1 parent 4eacdc3 commit 1fb817e
1 file changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | | - | |
33 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
34 | 49 | | |
35 | 50 | | |
36 | 51 | | |
| |||
0 commit comments