Skip to content

Commit

Permalink
Fix Copy GitHub Permalink with custom SSH
Browse files Browse the repository at this point in the history
  • Loading branch information
christianvuerings committed Feb 23, 2025
1 parent b120817 commit e82bfaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/issues/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export function getUpstreamOrigin(upstream: Remote, resultHost: string = 'github
fetchUrl = fetchUrl.substr('ssh://'.length);
}
// upstream's origin by ssh
if (fetchUrl.startsWith('git@') && !fetchUrl.startsWith('[email protected]')) {
if ((fetchUrl.startsWith('git@') || fetchUrl.includes('@git')) && !fetchUrl.startsWith('[email protected]')) {
const host = fetchUrl.split('@')[1]?.split(':')[0];
if (host.startsWith(enterpriseUri.authority) || !host.includes('github.com')) {
resultHost = enterpriseUri.authority;
Expand Down

0 comments on commit e82bfaa

Please sign in to comment.