Tweaks to make the GH hook work against the core repo API

I believe this got lost in the models refactor where we minimised some models and got rid of teams.
I added a docstring to the test to track why it's there.
I was playing with the hook by pushing to a new branch, and a git repo test failed.
Deleted the branch on remote, and it still failed, so I realised this was missing.