Function: repositoryUrl()
repositoryUrl(
cwd?,format?):string|undefined
The repo’s canonical remote URL, or undefined when there is no git remote.
Tries gh repo view first (host-accurate, no parsing), then normalizes
git remote get-url origin. A blank, omitted, or explicitly current cwd
reuses cached command probes; another resolved directory executes directly.
Parameters
Section titled “Parameters”string
directory to resolve from (defaults to process.cwd()).
format?
Section titled “format?”"https" | "npm"
"https" (default) yields https://host/owner/repo;
"npm" yields npm’s git+https://host/owner/repo.git form (for a
package.json repository.url that passes npm provenance).
Returns
Section titled “Returns”string | undefined