Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: renovatebot/renovate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 39.207.1
Choose a base ref
...
head repository: renovatebot/renovate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 39.207.2
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 17, 2025

  1. fix(nix): urldecode gitlab subgroups (#34863)

    xanderio authored Mar 17, 2025
    Copy the full SHA
    7aa1e47 View commit details
Showing with 42 additions and 1 deletion.
  1. +41 −0 lib/modules/manager/nix/extract.spec.ts
  2. +1 −1 lib/modules/manager/nix/extract.ts
41 changes: 41 additions & 0 deletions lib/modules/manager/nix/extract.spec.ts
Original file line number Diff line number Diff line change
@@ -602,4 +602,45 @@ describe('modules/manager/nix/extract', () => {
],
});
});

const flake12Lock = `{
"nodes": {
"subgroup-project": {
"locked": {
"lastModified": 1739792862,
"narHash": "sha256-n0MrSIZZknq2OqOYgNS0iMp2yVRekpBFGhrhsT7aXGg=",
"owner": "group%2Fsub-group",
"repo": "subgroup-project",
"rev": "24b560624f154c9e962d146217b2a964faaf2055",
"type": "gitlab"
},
"original": {
"owner": "group%2Fsub-group",
"repo": "subgroup-project",
"type": "gitlab"
}
},
"root": {
"inputs": {
"subgroup-project": "subgroup-project"
}
}
},
"root": "root",
"version": 7
}`;

it('uri decode gitlab subgroup', async () => {
fs.readLocalFile.mockResolvedValueOnce(flake12Lock);
expect(await extractPackageFile('', 'flake.nix')).toMatchObject({
deps: [
{
currentDigest: '24b560624f154c9e962d146217b2a964faaf2055',
datasource: 'git-refs',
depName: 'subgroup-project',
packageName: 'https://gitlab.com/group/sub-group/subgroup-project',
},
],
});
});
});
2 changes: 1 addition & 1 deletion lib/modules/manager/nix/extract.ts
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ export async function extractPackageFile(
currentValue: flakeOriginal.ref,
currentDigest: flakeLocked.rev,
datasource: GitRefsDatasource.id,
packageName: `https://${flakeOriginal.host ?? 'gitlab.com'}/${flakeOriginal.owner}/${flakeOriginal.repo}`,
packageName: `https://${flakeOriginal.host ?? 'gitlab.com'}/${decodeURIComponent(flakeOriginal.owner!)}/${flakeOriginal.repo}`,
});
break;
case 'git':