Skip to content

Commit dd45e91

Browse files
committed
chore: add commit-msg hook to strip Cursor co-author trailers
Document enabling .githooks so IDE-added Co-authored-by lines are not committed.
1 parent ad19a37 commit dd45e91

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

.githooks/commit-msg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# Strip Cursor co-author trailers added by IDE tooling.
3+
if [ -f "$1" ]; then
4+
sed -i.bak '/^Co-authored-by: Cursor /d' "$1"
5+
rm -f "$1.bak"
6+
fi
7+
exit 0

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ pnpm run build
1515

1616
Use **pnpm only** for installs in this repo. With Corepack enabled, `npm install` and `yarn install` are rejected. Do not commit `package-lock.json` or `yarn.lock` (see [SECURITY.md](SECURITY.md)).
1717

18+
**Git hooks (recommended):** enable `.githooks/commit-msg` once per clone so Cursor co-author trailers are stripped from commit messages:
19+
20+
```bash
21+
git config core.hooksPath .githooks
22+
```
23+
1824
### Testing locally
1925

2026
**Unit tests** (no HaloPSA credentials required):

0 commit comments

Comments
 (0)