listeners/jenkins: refactor out logic for findPushProjectForRepo()