Refactor post-receive