Skip to content

Commit

Permalink
Fix: allow github token in gitRemote
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchoi committed Sep 24, 2023
1 parent 8646e82 commit c8e1c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vscode/src/utils/git.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export async function getGitConfig(

export const getRepo = (gitRemoteConfig: string) => {
const gitRemoteConfigPattern =
/(?:https?|git)(?::\/\/(?:\w+@)?|@)(?:github\.com)(?:\/|:)(?:(?<owner>.+?)\/(?<repo>.+?))(?:\.git|\/)?$/m;
/(?:https?|git)(?::\/\/(?:\w+@)?|@)(?:github\.com)(?:\/|:)(?:(?<owner>.+?)\/(?<repo>.+?))(?:\.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");
Expand Down

0 comments on commit c8e1c73

Please sign in to comment.