Skip to main content

getGiteaFileContentsUrl()

Home > @backstage/integration > getGiteaFileContentsUrl

Given a URL pointing to a file, returns an api URL for fetching the contents of the data.

Signature:

function getGiteaFileContentsUrl(config: GiteaIntegrationConfig, url: string): string;

Parameters

ParameterTypeDescription
configGiteaIntegrationConfigThe relevant provider config
urlstringA URL pointing to a file

Returns:

string

Remarks

Converts from: https://gitea.com/a/b/src/branch/branchname/path/to/c.yaml to: https://gitea.com/api/v1/repos/a/b/contents/path/to/c.yaml?ref=branchname