diff --git a/packages/vscode/src/utils/git.util.ts b/packages/vscode/src/utils/git.util.ts index ed1a6e7d..132c1de3 100644 --- a/packages/vscode/src/utils/git.util.ts +++ b/packages/vscode/src/utils/git.util.ts @@ -208,7 +208,7 @@ export async function getGitConfig( export const getRepo = (gitRemoteConfig: string) => { const gitRemoteConfigPattern = - /(?:https?|git)(?::\/\/(?:\w+@)?|@)(?:github\.com)(?:\/|:)(?:(?.+?)\/(?.+?))(?:\.git|\/)?$/m; + /(?:https?|git)(?::\/\/(?:\w+@)?|@)(?:github\.com)(?:\/|:)(?:(?.+?)\/(?.+?))(?:\.git|\/)?(\S*)$/m; const gitRemote = gitRemoteConfig.match(gitRemoteConfigPattern)?.groups; if (!gitRemote) { throw new Error("git remote config should be: [https?://|git@]${domain}/${owner}/${repo}.git");