update hook logic to be more specific

fixes #687
Merge pull request #689 from rtfd/hook-repo-url

update hook logic to be more specific