Skip to main content
Version: Next

ScmIntegration.resolveUrl()

Home > @backstage/integration > ScmIntegration > resolveUrl

Resolves an absolute or relative URL in relation to a base URL.

This method is adapted for use within SCM systems, so relative URLs are within the context of the root of the hierarchy pointed to by the base URL.

For example, if the base URL is <repo root url>/folder/a.yaml, i.e. within the file tree of a certain repo, an absolute path of /b.yaml does not resolve to https://hostname/b.yaml but rather to <repo root url>/b.yaml inside the file tree of that same repo.

Signature:

resolveUrl(options: {
url: string;
base: string;
lineNumber?: number;
}): string;

Parameters

Parameter

Type

Description

options

{ url: string; base: string; lineNumber?: number; }

**Returns:**

string