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
Parameter | Type | Description |
---|---|---|
config | GiteaIntegrationConfig | The relevant provider config |
url | string | A 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