mirror of
https://github.com/ReScienceLab/opc-skills.git
synced 2026-09-14 18:03:27 +08:00
d612bef2b0
- 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
13 lines
407 B
JSON
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'"
|
|
}
|
|
]
|
|
}
|
|
}
|