Skip to content

Commit 6bff65c

Browse files
feat(presets): add changelogUrl link for GitLab-based digest updates
1 parent 4312453 commit 6bff65c

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

lib/config/presets/index.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ describe('config/presets/index', () => {
637637
'replacements:all',
638638
'workarounds:all',
639639
'helpers:githubDigestChangelogs',
640+
'helpers:gitlabDigestChangelogs',
640641
'helpers:goXPackagesChangelogLink',
641642
'helpers:goXPackagesNameLink',
642643
],

lib/config/presets/internal/config.preset.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const presets: Record<string, Preset> = {
3636
'replacements:all',
3737
'workarounds:all',
3838
'helpers:githubDigestChangelogs',
39+
'helpers:gitlabDigestChangelogs',
3940
'helpers:goXPackagesChangelogLink',
4041
'helpers:goXPackagesNameLink',
4142
],

lib/config/presets/internal/helpers.preset.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@ export const presets: Record<string, Preset> = {
3636
},
3737
],
3838
},
39+
gitlabDigestChangelogs: {
40+
description:
41+
'Ensure that every dependency pinned by digest and sourced from GitLab.com contains a link to the commit-to-commit diff',
42+
packageRules: [
43+
{
44+
changelogUrl:
45+
'{{sourceUrl}}/-/compare/{{currentDigest}}...{{newDigest}}',
46+
matchDatasources: [
47+
'git-refs',
48+
'git-tags',
49+
'gitlab-releases',
50+
'gitlab-tags',
51+
],
52+
matchSourceUrls: ['https://gitlab.com/**'],
53+
matchUpdateTypes: ['digest'],
54+
},
55+
],
56+
},
3957
goXPackagesChangelogLink: {
4058
description: 'Correctly link to the source code for golang.org/x packages',
4159
packageRules: [

0 commit comments

Comments
 (0)