import { URI } from "../../../base/common/uri.js"; /** Parses a github.com repository name or clone URL into owner/repository. */ export declare function getGitHubRepositoryId(repository: string): string | undefined; /** Normalized key for comparing pull request URLs irrespective of case and trailing slashes. */ export declare function getPullRequestUrlKey(url: string): string; /** A GitHub issue, identified by the repository that owns it and its number. */ export interface IGitHubIssueReference { readonly owner: string; readonly repo: string; readonly number: number; } /** Parses a public GitHub issue URL into its parts, or `undefined` when it is not one. */ export declare function parseGitHubIssueUrl(url: string): IGitHubIssueReference | undefined; /** Parses a canonical `https://github.com` pull request URL, without a query or fragment. */ export declare function parseGitHubPullRequestUrl(url: string): { readonly owner: string; readonly repo: string; readonly number: number; } | undefined; export interface IParsedPullRequestUrl { readonly owner: string; readonly repo: string; readonly number: number; /** REST API host the credential account must match (`api.github.com` for github.com). */ readonly apiHost: string; } /** Parses a pull request URL and derives its API host; callers determine which hosts are allowed. */ export declare function parsePullRequestUrl(value: string): IParsedPullRequestUrl | undefined; export interface IGitHubCommitTarget { readonly owner: string; readonly repo: string; readonly sha: string; readonly resource: URI; } /** Parses a github.com commit link, retaining the original resource and any trailing path. */ export declare function parseGitHubCommitTarget(resource: URI): IGitHubCommitTarget | undefined; export type GitHubLinkTarget = { readonly kind: "repository"; readonly owner: string; readonly repo: string; } | { readonly kind: "issue"; readonly owner: string; readonly repo: string; readonly number: number; } | { readonly kind: "pullRequest"; readonly owner: string; readonly repo: string; readonly number: number; }; /** Parses HTTPS repository, issue and pull request paths after the caller has selected the host. */ export declare function parseGitHubLinkTarget(resource: URI): GitHubLinkTarget | undefined;