Files
Yilin Jing d612bef2b0 chore: Add git hooks to prevent factory-droid[bot] co-author
- Add PreCommit hook that rejects commits containing factory-droid[bot] co-author
- Update .gitignore to allow .factory/hooks.json to be tracked
- Hook configuration file follows Factory hooks guide format
2026-02-02 20:24:02 +08:00

13 lines
407 B
JSON

{
"hooks": {
"PreCommit": [
{
"name": "prevent-factory-droid-coauthor",
"description": "Prevents adding factory-droid[bot] as co-author in commits",
"type": "command",
"command": "bash -c 'if git log -1 --pretty=%B | grep -q \"factory-droid\\[bot\\]\"; then echo \"Error: factory-droid[bot] co-author is not allowed in commits\"; exit 1; fi'"
}
]
}
}