captainhook.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {
  2. "config": {
  3. "ansi-colors": true,
  4. "fail-on-first-error": false,
  5. "plugins": [],
  6. "verbosity": "normal"
  7. },
  8. "commit-msg": {
  9. "enabled": false,
  10. "actions": []
  11. },
  12. "pre-push": {
  13. "enabled": true,
  14. "actions": [
  15. {
  16. "action": "composer test"
  17. }
  18. ]
  19. },
  20. "pre-commit": {
  21. "enabled": true,
  22. "actions": [
  23. {
  24. "action": "composer validate",
  25. "conditions": [
  26. {
  27. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\Any",
  28. "args": [["composer.json"]]
  29. }
  30. ]
  31. },
  32. {
  33. "action": "composer normalize --dry-run",
  34. "conditions": [
  35. {
  36. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\Any",
  37. "args": [["composer.json"]]
  38. }
  39. ]
  40. },
  41. {
  42. "action": "composer lint:paths -- {$STAGED_FILES|of-type:php}",
  43. "conditions": [
  44. {
  45. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
  46. "args": ["php"]
  47. }
  48. ]
  49. },
  50. {
  51. "action": "composer phpcs -- {$STAGED_FILES|of-type:php}",
  52. "conditions": [
  53. {
  54. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
  55. "args": ["php"]
  56. }
  57. ]
  58. }
  59. ]
  60. },
  61. "prepare-commit-msg": {
  62. "enabled": false,
  63. "actions": []
  64. },
  65. "post-commit": {
  66. "enabled": false,
  67. "actions": []
  68. },
  69. "post-merge": {
  70. "enabled": true,
  71. "actions": [
  72. {
  73. "action": "composer install --ansi",
  74. "conditions": [
  75. {
  76. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
  77. "args": [["composer.json", "composer.lock"]]
  78. }
  79. ]
  80. }
  81. ]
  82. },
  83. "post-checkout": {
  84. "enabled": true,
  85. "actions": [
  86. {
  87. "action": "composer install --ansi",
  88. "conditions": [
  89. {
  90. "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
  91. "args": [["composer.json", "composer.lock"]]
  92. }
  93. ]
  94. }
  95. ]
  96. },
  97. "post-rewrite": {
  98. "enabled": false,
  99. "actions": []
  100. },
  101. "post-change": {
  102. "enabled": false,
  103. "actions": []
  104. }
  105. }