Skip to main content

getBitbucketServerFileFetchUrl()

Home > @backstage/integration > getBitbucketServerFileFetchUrl

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 getBitbucketServerFileFetchUrl(url: string, config: BitbucketServerIntegrationConfig): string;

Parameters

ParameterTypeDescription
urlstringA URL pointing to a file
configBitbucketServerIntegrationConfigThe relevant provider config

Returns:

string

Remarks

Converts from: https://bitbucket.company.com/projectname/reponame/src/main/file.yaml to: https://bitbucket.company.com/rest/api/1.0/project/projectname/reponame/raw/file.yaml?at=main