import bunyan from "bunyan"; export declare const GITHUB_ORIGIN: "https://github.com"; export declare function tempSetGithubSystemLogger(log: bunyan): void; type GitHubRepoDetails = { /** @example "Codesee-io" */ repoOwner: string; /** @example "oss-port" */ repoName: string; /** @example "Codesee-io/oss-port" */ repoFullName: string; /** @example "https://github.com/Codesee-io" */ repoOwnerUrl: string; /** @example "github.com" */ domain: string; /** @example "https://github.com" */ githubOrigin: string; }; /** * Returns information about a repository using its URL. If repoOrigin is not a * valid url, this function will throw an exception. * * Note: this function assumes that the repository is hosted at the root of a * domain, but this might not always be the case! * * @example getGitHubRepoDetailsFromOrigin("https://github.com/Codesee-io/oss-port") * { * repoOwner: "Codesee-io", * repoName: "oss-port", * repoFullName: "Codesee-io/oss-port" * repoOwnerUrl: "https://github.com/Codesee-io", * domain: "github.com" * githubOrigin: "https://github.com" * } */ export declare function getGitHubRepoDetailsFromOrigin(repoOrigin: string): GitHubRepoDetails; /** * Returns "srcHost" given a repoOrigin. * * This "srcHost" is a concept used uniquely by lambdas. * It's a part of the S3 path used to store Review Map images. * See `render-diagram-images.ts` * * Because it cannot contain forward slash ("/"), we use a domain. * However, for historical reasons, we use "github" instead of "github.com" * * WARNING: cli-runner also uses a concept called "srcHost", but that is * always "github.com" */ export declare function getGitHubSrcHostForReviewMapsFromRepoOrigin(repoOrigin: string): string; /** * Returns `true` if the repo origin is from GitHub. * @example repoOriginIsGitHub("https://github.com/Codesee-io") // true * @example repoOriginIsGitHub("https://github.com/Codesee-io/oss-port") // true * @example repoOriginIsGitHub("https://api.github.com") // false * @example repoOriginIsGitHub("https://gitlab.com/Codesee-io") // false */ export declare function repoOriginIsGitHub(repoOrigin: string): boolean; /** * For a githubOrigin, returns the correct avatar path. If input string is * undefined or empty, we assume github cloud * @example gitGitHubAvatarPath("https://github.com") -> * "https://avatars.githubusercontent.com" * @example gitGitHubAvatarPath("https://ghes.acme.com") -> * "https://ghes.acme.com/avatars" * @param githubOrigin a github origin * @returns the avatar path */ export declare function getGitHubAvatarPath(githubOrigin?: string): string; export {}; //# sourceMappingURL=github.d.ts.map