[HookConfiguration] Make the commits node more permissive

It seems when a branch is deleted, there is not commits in the hook. It is not the case in the hook configuration. This PR solves this issue...

ping @tmartin :kiss: