File tree 2 files changed +42
-1
lines changed
2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -602,4 +602,45 @@ describe('modules/manager/nix/extract', () => {
602
602
] ,
603
603
} ) ;
604
604
} ) ;
605
+
606
+ const flake12Lock = `{
607
+ "nodes": {
608
+ "subgroup-project": {
609
+ "locked": {
610
+ "lastModified": 1739792862,
611
+ "narHash": "sha256-n0MrSIZZknq2OqOYgNS0iMp2yVRekpBFGhrhsT7aXGg=",
612
+ "owner": "group%2Fsub-group",
613
+ "repo": "subgroup-project",
614
+ "rev": "24b560624f154c9e962d146217b2a964faaf2055",
615
+ "type": "gitlab"
616
+ },
617
+ "original": {
618
+ "owner": "group%2Fsub-group",
619
+ "repo": "subgroup-project",
620
+ "type": "gitlab"
621
+ }
622
+ },
623
+ "root": {
624
+ "inputs": {
625
+ "subgroup-project": "subgroup-project"
626
+ }
627
+ }
628
+ },
629
+ "root": "root",
630
+ "version": 7
631
+ }` ;
632
+
633
+ it ( 'uri decode gitlab subgroup' , async ( ) => {
634
+ fs . readLocalFile . mockResolvedValueOnce ( flake12Lock ) ;
635
+ expect ( await extractPackageFile ( '' , 'flake.nix' ) ) . toMatchObject ( {
636
+ deps : [
637
+ {
638
+ currentDigest : '24b560624f154c9e962d146217b2a964faaf2055' ,
639
+ datasource : 'git-refs' ,
640
+ depName : 'subgroup-project' ,
641
+ packageName : 'https://gitlab.com/group/sub-group/subgroup-project' ,
642
+ } ,
643
+ ] ,
644
+ } ) ;
645
+ } ) ;
605
646
} ) ;
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export async function extractPackageFile(
105
105
currentValue : flakeOriginal . ref ,
106
106
currentDigest : flakeLocked . rev ,
107
107
datasource : GitRefsDatasource . id ,
108
- packageName : `https://${ flakeOriginal . host ?? 'gitlab.com' } /${ flakeOriginal . owner } /${ flakeOriginal . repo } ` ,
108
+ packageName : `https://${ flakeOriginal . host ?? 'gitlab.com' } /${ decodeURIComponent ( flakeOriginal . owner ! ) } /${ flakeOriginal . repo } ` ,
109
109
} ) ;
110
110
break ;
111
111
case 'git' :
You can’t perform that action at this time.
0 commit comments