GerritUrlReader
Home > @backstage/backend-common
> GerritUrlReader
Implements a UrlReaderService for files in Gerrit.
Signature:
class GerritUrlReader implements UrlReader
Implements: UrlReader
Remarks
To be able to link to Git contents for Gerrit providers in a user friendly way we are depending on that there is a Gitiles installation somewhere that we can link to. It is perfectly possible to integrate Gerrit with Backstage without Gitiles since all API calls goes directly to Gerrit. However if Gitiles is configured, readTree will use it to fetch an archive instead of cloning the repository.
The "host" variable in the config is the Gerrit host. The address where Gitiles is installed may be on the same host but it could be on a separate host. For example a Gerrit instance could be hosted on "gerrit-review.company.com" but the repos could be browsable on a separate host, e.g. "gerrit.company.com" and the human readable URL would then not point to the API host.
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(integration, deps, workDir) | Constructs a new instance of the GerritUrlReader class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
factory | static | ReaderFactory |
Methods
Method | Modifiers | Description |
---|---|---|
read(url) | ||
readTree(url, options) | ||
readUrl(url, options) | ||
search() | ||
toString() |