File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export async function download(
46
46
}
47
47
48
48
const inputRegex =
49
- / ^ (?< repo > [ \w . - ] + \/ [ \w . - ] + ) (?< subdir > [ ^ # ] + ) ? (?< ref > # [ \w . - ] + ) ? / ;
49
+ / ^ (?< repo > [ \w . - ] + \/ [ \w . - ] + ) (?< subdir > [ ^ # ] + ) ? (?< ref > # [ \w . / - ] + ) ? / ;
50
50
51
51
export function parseGitURI ( input : string ) : GitInfo {
52
52
const m = input . match ( inputRegex ) ?. groups || { } ;
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ describe("parseGitURI", () => {
6
6
const tests = [
7
7
{ input : "org/repo" , output : { } } ,
8
8
{ input : "org/repo#ref" , output : { ref : "ref" } } ,
9
+ { input : "org/repo#ref-123" , output : { ref : "ref-123" } } ,
10
+ { input : "org/repo#ref/ABC-123" , output : { ref : "ref/ABC-123" } } ,
9
11
{ input : "org/repo/foo/bar" , output : { subdir : "/foo/bar" } } ,
10
12
] ;
11
13
You can’t perform that action at this time.
0 commit comments