Skip to content

Conversation

@gustavkj
Copy link
Contributor

@gustavkj gustavkj commented Oct 17, 2025

Fixes: #502

Adds support for non-URL formatted remotes for ghe.com repos, e.g. company@company.ghe.com:org/repo.git. To do this safely, the remote is parsed using regex and the host is extracted. This should better be aligned with the security concerns raised in #469.

@gustavkj gustavkj requested a review from a team as a code owner October 17, 2025 15:56
Comment on lines +29 to +33
return url.host.endsWith(".ghe.com");
} catch (_error) {
const match = gitRemotePattern.exec(pushUrl);

return Boolean(match?.groups?.host?.endsWith(".ghe.com"));
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels like all of these endsWith(".ghe.com") https://github.com/search?q=repo%3Agithub%2Fvscode-github-actions%20ghe.com&type=code should be converted into a function to reduce code duplication and tell a better story.

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.

GHE.com support broken for SSH/Git remote URLs

2 participants