Hooks seem more suitable for this use case, because 1) it's easier to allow complicated stuff, 2) sysadmins aren't meant to use this config option.
On gerrit there's an attempt from 2015. It's probably easier to start again from scratch, but the implementation can be copied.