getGitLabFileFetchUrl()
Home > @backstage/integration
> getGitLabFileFetchUrl
Given a URL pointing to a file on a provider, returns a URL that is suitable for fetching the contents of the data.
Signature:
function getGitLabFileFetchUrl(url: string, config: GitLabIntegrationConfig): Promise<string>;
Parameters
Parameter |
Type |
Description |
---|---|---|
url |
string |
A URL pointing to a file |
config |
The relevant provider config |
Promise<string>
Remarks
Converts from: https://gitlab.example.com/a/b/blob/master/c.yaml to: https://gitlab.com/api/v4/projects/projectId/repository/c.yaml?ref=master -or- from: https://gitlab.com/groupA/teams/teamA/subgroupA/repoA/-/blob/branch/filepath to: https://gitlab.com/api/v4/projects/projectId/repository/files/filepath?ref=branch