Skip to content

Commit

Permalink
fix(config)!: Use depNameSanitized in branch name for vulnerability…
Browse files Browse the repository at this point in the history
… alerts (#25166)

Use sanitized depName in vulnerability/remediation branches instead of raw depName. This will result in some open remediation branches being autoclosed and replaced for ecosystems like go in particular which have special characters in depNames.

BREAKING CHANGE: Branch names for remediation will be sanitized to exclude special characters, potentially resulting in some autoclosing/replacing of existing PRs.
  • Loading branch information
takac authored and rarkins committed May 6, 2024
1 parent 2e9cdf1 commit 51c44b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ const options: RenovateOptions[] = [
minimumReleaseAge: null,
rangeStrategy: 'update-lockfile',
commitMessageSuffix: '[SECURITY]',
branchTopic: `{{{datasource}}}-{{{depName}}}-vulnerability`,
branchTopic: `{{{datasource}}}-{{{depNameSanitized}}}-vulnerability`,
prCreation: 'immediate',
},
mergeable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`workers/repository/init/vulnerability detectVulnerabilityAlerts() retur
{
"allowedVersions": "1.8.3",
"force": {
"branchTopic": "{{{datasource}}}-{{{depName}}}-vulnerability",
"branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
"commitMessageSuffix": "[SECURITY]",
"dependencyDashboardApproval": false,
"groupName": null,
Expand Down Expand Up @@ -40,7 +40,7 @@ exports[`workers/repository/init/vulnerability detectVulnerabilityAlerts() retur
{
"allowedVersions": "1.8.3",
"force": {
"branchTopic": "{{{datasource}}}-{{{depName}}}-vulnerability",
"branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
"commitMessageSuffix": "[SECURITY]",
"dependencyDashboardApproval": false,
"groupName": null,
Expand Down Expand Up @@ -75,7 +75,7 @@ exports[`workers/repository/init/vulnerability detectVulnerabilityAlerts() retur
{
"allowedVersions": "2.7.9.4",
"force": {
"branchTopic": "{{{datasource}}}-{{{depName}}}-vulnerability",
"branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
"commitMessageSuffix": "[SECURITY]",
"dependencyDashboardApproval": false,
"groupName": null,
Expand Down Expand Up @@ -110,7 +110,7 @@ exports[`workers/repository/init/vulnerability detectVulnerabilityAlerts() retur
{
"allowedVersions": "==2.2.1.0",
"force": {
"branchTopic": "{{{datasource}}}-{{{depName}}}-vulnerability",
"branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}-vulnerability",
"commitMessageSuffix": "[SECURITY]",
"dependencyDashboardApproval": false,
"groupName": null,
Expand Down

0 comments on commit 51c44b2

Please sign in to comment.