diff --git a/renovate.json b/renovate.json index 6d0afb9..29b20a1 100644 --- a/renovate.json +++ b/renovate.json @@ -1,47 +1,50 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "platform": "github", - "labels": ["renovate"], - "extends": [ - "config:base", - ":rebaseStalePrs" - ], - "enabledManagers": [ - "github-actions", - "nuget" - ], - "stabilityDays": 3, - "prHourlyLimit": 0, - "prConcurrentLimit": 0, - "branchConcurrentLimit": 0, - "dependencyDashboard": false, - "gitAuthor": "Renovate Bot ", - "packageRules": [ - { - "matchManagers": ["nuget"], - "excludePackagePatterns": ["^Microsoft\\.Extensions\\.", "^System\\.", "^dotnet-sdk$", "^Microsoft\\.CodeAnalysis\\.CSharp\\."], - "groupName": "NuGet dependencies" - }, - { - "matchManagers": ["nuget"], - "matchPackagePatterns": ["^Microsoft\\.(Extensions|AspNetCore|SourceLink)\\.", "^System\\.", "^Microsoft\\.CodeAnalysis\\.CSharp\\."], - "groupName": "Ignored NuGet dependencies", - "description": "These packages are usually set to a user-defined minimal supported version such as 6.0.0 for .NET 6, and they are overriden by consuming applications", - "enabled": false - }, - { - "matchPackageNames": ["dotnet-sdk"], - "groupName": "Dotnet SDK", - "description": "Only update patch and minor for the dotnet SDK version within the global.json", - "extends": [":disableMajorUpdates"] - }, - { - "matchManagers": ["github-actions"], - "groupName": "Pipeline dependencies" - } - ], - "vulnerabilityAlerts": { - "enabled": true, - "labels": ["security"] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "platform": "github", + "extends": [ + "github>gsoft-inc/renovate-config" + ], + "stabilityDays": 3, + "packageRules": [ + { + "matchManagers": ["nuget"], + "excludePackagePatterns": ["^Microsoft\\.Extensions\\.", "^System\\.", "^dotnet-sdk$", "^Microsoft\\.CodeAnalysis\\.CSharp\\."], + "groupName": "NuGet dependencies" + }, + { + "matchManagers": ["nuget"], + "matchPackagePatterns": ["^Microsoft\\.(Extensions|AspNetCore)\\.", "^System\\.", "^Microsoft\\.CodeAnalysis\\.CSharp\\."], + "groupName": "Ignored NuGet dependencies", + "description": "These packages are usually set to a user-defined minimal supported version such as 6.0.0 for .NET 6, and they are overriden by consuming applications", + "enabled": false + }, + { + "matchManagers": ["github-actions"], + "groupName": "Pipeline dependencies" } - } \ No newline at end of file + ], + "customManagers": [ + { + "description": "Custom manager for renovating spectral version listed in .cs files", + "customType": "regex", + "fileMatch": ["\\.cs$"], + "matchStringsStrategy": "any", + "matchStrings": [ + "private const string SpectralVersion = \"(?[^\"]+)\";" + ], + "datasourceTemplate": "github-tags", + "depNameTemplate": "stoplightio/spectral" + }, + { + "description": "Custom manager for renovating oasdiff version listed in .cs files", + "customType": "regex", + "fileMatch": ["\\.cs$"], + "matchStringsStrategy": "any", + "matchStrings": [ + "private const string OasdiffVersion = \"(?[^\"]+)\";" + ], + "datasourceTemplate": "github-tags", + "depNameTemplate": "Tufin/oasdiff" + } + ] +} \ No newline at end of file diff --git a/src/Workleap.OpenApi.MSBuild/OasdiffManager.cs b/src/Workleap.OpenApi.MSBuild/OasdiffManager.cs index 32d3d99..7933475 100644 --- a/src/Workleap.OpenApi.MSBuild/OasdiffManager.cs +++ b/src/Workleap.OpenApi.MSBuild/OasdiffManager.cs @@ -5,6 +5,7 @@ namespace Workleap.OpenApi.MSBuild; internal sealed class OasdiffManager : IOasdiffManager { + // If the line below changes, make sure to update the corresponding regex on the renovate.json file private const string OasdiffVersion = "1.10.11"; private const string OasdiffDownloadUrlFormat = "https://github.com/Tufin/oasdiff/releases/download/v{0}/{1}"; diff --git a/src/Workleap.OpenApi.MSBuild/Spectral/SpectralInstaller.cs b/src/Workleap.OpenApi.MSBuild/Spectral/SpectralInstaller.cs index 8e20aeb..f14ddb0 100644 --- a/src/Workleap.OpenApi.MSBuild/Spectral/SpectralInstaller.cs +++ b/src/Workleap.OpenApi.MSBuild/Spectral/SpectralInstaller.cs @@ -2,6 +2,7 @@ internal class SpectralInstaller { + // If the line below changes, make sure to update the corresponding regex on the renovate.json file private const string SpectralVersion = "6.11.0"; private const string SpectralDownloadUrlFormat = "https://github.com/stoplightio/spectral/releases/download/v{0}/{1}"; diff --git a/src/Workleap.OpenApi.MSBuild/Spectral/SpectralRunner.cs b/src/Workleap.OpenApi.MSBuild/Spectral/SpectralRunner.cs index 0ccbf0c..9d58ac6 100644 --- a/src/Workleap.OpenApi.MSBuild/Spectral/SpectralRunner.cs +++ b/src/Workleap.OpenApi.MSBuild/Spectral/SpectralRunner.cs @@ -5,6 +5,7 @@ namespace Workleap.OpenApi.MSBuild.Spectral; internal sealed class SpectralRunner { + // If the line below changes, make sure to update the corresponding regex on the renovate.json file private const string SpectralVersion = "6.11.0"; private readonly ILoggerWrapper _loggerWrapper;