-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow slashes in gitlab project section
Technically these are called groups and subgroups in GitLab parlance, but effectively, it means that a GitLab project url can have a path with unlimited portions, like company/property/team/component.git. This allows passing in unlimited path portions in the full url, and avoids encoding the `project` section akin to how `path` is treated as of 3776fa5 #44 Fix #46 Fix #43
- Loading branch information
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,15 @@ test('fromUrl(gitlab url)', function (t) { | |
require('./lib/standard-tests')(verify, 'gitlab.com', 'gitlab') | ||
require('./lib/standard-tests')(verify, 'www.gitlab.com', 'gitlab') | ||
|
||
const subsShort = HostedGit.fromUrl('gitlab:adpt/starters/hello-node') | ||
const subsFull = HostedGit.fromUrl('git+https://gitlab.com/adpt/starters/hello-node.git') | ||
t.ok(subsShort) | ||
t.equal(subsShort.https(), 'git+https://gitlab.com/adpt/starters/hello-node.git') | ||
t.equal(subsShort.ssh(), '[email protected]:adpt/starters/hello-node.git') | ||
t.ok(subsFull) | ||
t.equal(subsFull.https(), 'git+https://gitlab.com/adpt/starters/hello-node.git') | ||
t.equal(subsFull.ssh(), '[email protected]:adpt/starters/hello-node.git') | ||
|
||
t.is( | ||
HostedGit.fromUrl('gitlab:group/sub group1/subgroup2/repo').https(), | ||
'git+https://gitlab.com/group/sub%20group1/subgroup2/repo.git', | ||
|