Skip to content

Fix Copy GitHub Permalink with custom SSH#6669

Merged
alexr00 merged 1 commit intomicrosoft:mainfrom
christianvuerings:fix-custom-ssh-copy-github-permalink
Feb 24, 2025
Merged

Fix Copy GitHub Permalink with custom SSH#6669
alexr00 merged 1 commit intomicrosoft:mainfrom
christianvuerings:fix-custom-ssh-copy-github-permalink

Conversation

@christianvuerings
Copy link
Contributor

Fixes #6668

@christianvuerings christianvuerings force-pushed the fix-custom-ssh-copy-github-permalink branch from bab3f07 to e82bfaa Compare February 23, 2025 14:35
}
// upstream's origin by ssh
if (fetchUrl.startsWith('git@') && !fetchUrl.startsWith('[email protected]')) {
if ((fetchUrl.startsWith('git@') || fetchUrl.includes('@git')) && !fetchUrl.startsWith('[email protected]')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue was that we would only match [email protected]:organization/repo.git, not [email protected]:organization/repo.git

Open to other suggestions as well - e.g. matching .endsWith('.git') instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable heuristic to me!

@christianvuerings
Copy link
Contributor Author

@microsoft-github-policy-service agree

@alexr00 alexr00 enabled auto-merge (squash) February 24, 2025 10:28
Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@alexr00 alexr00 added this to the February 2025 milestone Feb 24, 2025
@alexr00 alexr00 merged commit add6da8 into microsoft:main Feb 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy GitHub Permalink doesn't work with custom SSH

3 participants