captainhookphp / captainhook

CaptainHook is a very flexible git hook manager for software developers that makes sharing git hooks with your team a breeze.
http://captainhook.info
MIT License
996 stars 86 forks source link

allow ThatIs filter to take multivalued options (BC BREAK) #210

Closed CircleCode closed 1 year ago

CircleCode commented 1 year ago

this fix allows to add a condition for staged files contains a php file from either directory foo or bar in the form

"conditions": [
  {
    "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\ThatIs",
    "args": [
      {
        "ofType": "php",
        "inDirectory": ["foo/", "bar/"]
      }
    ]
  }
]

:warning: :warning: :warning: this also contains a minor (IMHO) BC break: :warning: :warning: :warning:

@sebastianfeldmann do not hesitate to update or reject this PR if you disagree with it

CircleCode commented 1 year ago

@sebastianfeldmann let me fix CS, sorry, I always forget this is not in pre-commit hook ;-)