UNPKG

git-command-helper

Version:
14 lines (13 loc) 715 B
import { ExtendedSpawnOptions } from "./infoOptions"; /** * Get GitHub URL for a single file or folder in a repository. * * @param repositoryPath - Absolute or relative path to the file or folder. * @param opt - Options for git operations. If not provided or missing `cwd`, defaults to `repositoryPath`. * @param remoteUrl - Optional remote URL to override the git config remote. Useful for testing or custom remotes. * @returns An object containing `remoteURL` (tree view) and `rawURL` (raw file view) for the file/folder on GitHub. */ export declare function getGithubRepoUrl(repositoryPath: string, opt?: ExtendedSpawnOptions, remoteUrl?: string): Promise<{ remoteURL: string; rawURL: string; }>;