MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / cleanRepositoryName

Function cleanRepositoryName

shared/github-repository-url.ts:16–18  ·  view source on GitHub ↗
(repo: string)

Source from the content-addressed store, hash-verified

14const githubShorthandUrlPattern = /^github\.com\/([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i
15
16function cleanRepositoryName(repo: string) {
17 return repo.replace(gitSuffixPattern, '').trim()
18}
19
20function buildGitHubRepositoryLink(
21 owner: string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected