import { GiteaIntegrationConfig } from './config'; /** * Given a URL pointing to a file, returns a URL * for editing the contents of the data. * * @remarks * * Converts * from: https://gitea.com/a/b/src/branchname/path/to/c.yaml * or: https://gitea.com/a/b/_edit/branchname/path/to/c.yaml * * @param url - A URL pointing to a file * @param config - The relevant provider config * @public */ export declare function getGiteaEditContentsUrl(config: GiteaIntegrationConfig, url: string): string; /** * Given a URL pointing to a file, returns an api URL * for fetching the contents of the data. * * @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 * * @param url - A URL pointing to a file * @param config - The relevant provider config * @public */ export declare function getGiteaFileContentsUrl(config: GiteaIntegrationConfig, url: string): string; /** * Given a URL pointing to a repository/path, returns a URL * for archive contents of the repository. * * @remarks * * Converts * from: https://gitea.com/a/b/src/branchname * or: https://gitea.com/api/v1/repos/a/b/archive/branchname.tar.gz * * @param url - A URL pointing to a repository/path * @param config - The relevant provider config * @public */ export declare function getGiteaArchiveUrl(config: GiteaIntegrationConfig, url: string): string; /** * Given a URL pointing to a repository branch, returns a URL * for latest commit information. * * @remarks * * Converts * from: https://gitea.com/a/b/src/branchname * or: https://gitea.com/api/v1/repos/a/b/git/commits/branchname * * @param url - A URL pointing to a repository branch * @param config - The relevant provider config * @public */ export declare function getGiteaLatestCommitUrl(config: GiteaIntegrationConfig, url: string): string; /** * Return request headers for a Gitea provider. * * @param config - A Gitea provider config * @public */ export declare function getGiteaRequestOptions(config: GiteaIntegrationConfig): { headers?: Record; }; /** * Return parsed git url properties. * * @param config - A Gitea provider config * @param url - A URL pointing to a repository * @public */ export declare function parseGiteaUrl(config: GiteaIntegrationConfig, url: string): { url: string; owner: string; name: string; ref: string; path: string; };