Most of the built-in post-receive hooks are applied based on an arbitrary condition. Diagnosable conditions allow you to show the user exactly why the hook was applied for their pushed changes.
Take a look at the examples in the diagnosable conditions section for pre-receive hooks where the diagnosable conditions are similar.