make endpoint auto-detection for repo slugs work properly with enterprise, fixes #83, fixes #122