Skip to main content

getBitbucketCloudFileFetchUrl()

Home > @backstage/integration > getBitbucketCloudFileFetchUrl

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

Parameters

ParameterTypeDescription
urlstringA URL pointing to a file
configBitbucketCloudIntegrationConfigThe relevant provider config

Returns:

string

Remarks

Converts from: https://bitbucket.org/orgname/reponame/src/master/file.yaml to: https://api.bitbucket.org/2.0/repositories/orgname/reponame/src/master/file.yaml