Fix for ticket:2981: Bitbucket hook doesn't work when specifying project

I basically just copied the fix from the ``github.py`` web hook dialect.
I've edited my comment, it seems i was a bit quick on the gun. But i can replace the `raw_project` with this approach in both the github and gitlab.