set selectedRepository(repository: undefined | Repository): void
Returns with the previously selected repository, or if no repository has been selected yet,
it picks the first available repository from the backend and sets it as the selected one and returns with that.
If no repositories are available, returns undefined.
Sets the selected repository, but do nothing if the given repository is not a Git repository
registered with the SCM service. We must be sure not to clear the selection if the selected
repository is managed by an SCM other than Git.