fix: view repository button using ssh:// protocol (#1118)
This commit is contained in:
parent
0b2125ffbd
commit
db4f370863
1 changed files with 2 additions and 2 deletions
|
@ -78,8 +78,8 @@ export async function activity(previous: ActivityPayload = {}) {
|
|||
let repo = git.repositories.find((repo) => repo.ui.selected)?.state.remotes[0]?.fetchUrl;
|
||||
|
||||
if (repo) {
|
||||
if (repo.startsWith('git@')) {
|
||||
repo = repo.replace(':', '/').replace('git@', 'https://').replace('.git', '');
|
||||
if (repo.startsWith('git@') || repo.startsWith('ssh://')) {
|
||||
repo = repo.replace('ssh://', '').replace(':', '/').replace('git@', 'https://').replace('.git', '');
|
||||
} else {
|
||||
repo = repo.replace(/(https:\/\/)([^@]*)@(.*?$)/, '$1$3').replace('.git', '');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue