added functionality and tests for gitthub:migrate_hooks