diff --git a/packages/nx/src/command-line/release/utils/github.ts b/packages/nx/src/command-line/release/utils/github.ts index 6bfc992ce3468..81c4578b5b8dc 100644 --- a/packages/nx/src/command-line/release/utils/github.ts +++ b/packages/nx/src/command-line/release/utils/github.ts @@ -43,7 +43,7 @@ export function getGitHubRepoSlug(remoteName = 'origin'): RepoSlug { }).trim(); // Extract the 'user/repo' part from the URL - const regex = /github\.com[/:]([\w-]+\/[\w-]+)/; + const regex = /(?:github(?:\.|(?:(?:\.\w{2,}){1,})(?!\w))(?:[/:])|git@[\w.-]+:)([\w-]+\/[\w-]+)/; const match = remoteUrl.match(regex); if (match && match[1]) {