Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow repository guessing for bitbucket and gitlab #562
The plugin has a repository browser guesser if a repository browser is not selected. Previously, that guesser was limited to a subset of github URLs.
This pull request broadens the types of github URLs which will be recognized and adds bitbucket.org and gitlab.com as possible guesses.
Repository browser guessing is only useful for those repository hosting services which have a well-known host name, like github.com, bitbucket.org, and gitlab.com. Internally hosted GitHub enterprise, or Bitbucket, or GitLab will still need to specify the repository browser, as will other browser types.
I intentionally chose the simpler implementation rather than implementing this using an abstract GitRepositoryBrowserDescriptor. Since the number of public git repository browsers supported by the plugin is quite small, it seemed simpler to extend the existing regular expression based detection technique and return the matching browser rather than modify GitSCM and the relevant repository browser classes.