Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: allow github token in gitRemote #494

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -111,7 +111,7 @@
if (await isExecutable(file)) {
try {
return await getGitExecutable(file);
} catch (_) {}

Check warning on line 114 in packages/vscode/src/utils/git.util.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Empty block statement
}
}
return Promise.reject<GitExecutable>();
Expand Down Expand Up @@ -147,7 +147,7 @@
for (let i = 0; i < paths.length; i++) {
try {
return await getGitExecutable(paths[i]);
} catch (_) {}

Check warning on line 150 in packages/vscode/src/utils/git.util.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Empty block statement
}
throw new Error("None of the provided paths are a Git executable");
}
Expand Down Expand Up @@ -208,7 +208,7 @@

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
Loading