* Rename "apiBaseUrl" to the more suitable "baseUrl".
* Removed the Gerrit location doc (will be added later together
with the "urlReader" implementation.
* Fixed the line number handling in Gerrit/resolveUrl.
Signed-off-by: Niklas Aronsson <niklasar@axis.com>
If the apiBaseUrl is not set assume that the gerrit instance
uses https and can be reached on the address specified by the
"host" option.
Signed-off-by: Niklas Aronsson <niklasar@axis.com>
A new ScmIntegration has been added for reading entities from
gits hosted by Gerrit. The UrlReader implementation will be done
in an upcoming patch.
The Gerrit configuration supports the following values:
* host (required) : The host of the gerrit instance to use.
* apiBaseUrl (required): The base url of the gerrit api.
* username (optional): The username to use during authentication.
* password (optional): The password or http token to use for
authentication.
Signed-off-by: Niklas Aronsson <niklasar@axis.com>
Ensure presence of apiBaseUrl for bitbucket
integrations for both cases Bitbucket Cloud and
Bitbucket Server by setting the default for
Bitbucket Server at the integration config, too.
Replace hardcoded uses of the default apiBaseUrl
with the use of the integration config's value.
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
Use the actual line number syntax for Bitbucket Cloud
and Bitbucket Server.
Closes: #9764
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
Changed the repoIDLookup concatenation from 'url.protocol + url.host' to
'url.origin', which does essentially the same but is simpler.
Signed-off-by: Edgar Silva <edgar.silva@cross-join.com>
Updated integration module to allow for the use of a custom port, which
is often the case in self hosted gitlab instances
Removed host.includes(':') check in config.ts to allow for users to
include the port in the host
Changed url.hostname to url.host in core.ts to include the port in the
api call (otherwise it'll result in an error when trying to import a new
component)
Signed-off-by: Edgar Silva <edgar.silva@cross-join.com>
While this is less obvious to the user this facilitates anonymous access
to (public) files where the app is installed but the owner is not in the
allowed list.
Signed-off-by: Iain Billett <iain@roadie.io>