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

Adds support for non-git usernames in stringified url #28

Merged
merged 3 commits into from
Dec 28, 2016

Conversation

cbargren
Copy link
Contributor

This will use whatever username is specified for ssh urls instead of the hardcoded git value.

import GitUrlParse from 'git-url-parse';

const url = GitUrlParse('ssh://myuser@mygitserver.com/owner/repo.git');
GitUrlParse.stringify(url); // 'git@mygitserver.com:owner/repo.git' <-- wrong username

// With change
GitUrlParse.stringify(url); // 'myuser@mygitserver.com:owner/repo.git'

I also added a change that will allow multiple protocols (ssh+git) to be stringified properly even if the type isn't specified in the method call.

Copy link
Owner

@IonicaBizau IonicaBizau left a comment

Choose a reason for hiding this comment

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

That looks good! 👍

@IonicaBizau IonicaBizau mentioned this pull request Dec 28, 2016
@IonicaBizau IonicaBizau merged commit dab4b01 into IonicaBizau:master Dec 28, 2016
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.

None yet

2 participants