captainhook.json 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. "pre-push": {
  3. "enabled": true,
  4. "actions": [
  5. {
  6. "action": "composer analyse"
  7. }
  8. ]
  9. },
  10. "pre-commit": {
  11. "enabled": true,
  12. "actions": [
  13. {
  14. "action": "composer cs-fix -- --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
  15. "conditions": [
  16. {
  17. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
  18. "args": ["php"]
  19. }
  20. ]
  21. }
  22. ]
  23. },
  24. "post-change": {
  25. "enabled": true,
  26. "actions": [
  27. {
  28. "action": "composer install",
  29. "options": [],
  30. "conditions": [
  31. {
  32. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
  33. "args": [
  34. [
  35. "composer.json",
  36. "composer.lock"
  37. ]
  38. ]
  39. }
  40. ]
  41. }
  42. ]
  43. }
  44. }