Skip to content

Commit

Permalink
[IDP-1037] Add spectral and oasdiff to our renovate monitoring (#71)
Browse files Browse the repository at this point in the history
* [IDP-1037] Add spectral and oasdiff to our renovate monitoring

* Use shared renovate config
  • Loading branch information
heqianwang authored Aug 14, 2024
1 parent 895e94c commit 7e8d292
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 45 deletions.
93 changes: 48 additions & 45 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -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 <bot@renovateapp.com>",
"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"
}
}
],
"customManagers": [
{
"description": "Custom manager for renovating spectral version listed in .cs files",
"customType": "regex",
"fileMatch": ["\\.cs$"],
"matchStringsStrategy": "any",
"matchStrings": [
"private const string SpectralVersion = \"(?<currentValue>[^\"]+)\";"
],
"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 = \"(?<currentValue>[^\"]+)\";"
],
"datasourceTemplate": "github-tags",
"depNameTemplate": "Tufin/oasdiff"
}
]
}
1 change: 1 addition & 0 deletions src/Workleap.OpenApi.MSBuild/OasdiffManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}";

Expand Down
1 change: 1 addition & 0 deletions src/Workleap.OpenApi.MSBuild/Spectral/SpectralInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}";

Expand Down
1 change: 1 addition & 0 deletions src/Workleap.OpenApi.MSBuild/Spectral/SpectralRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7e8d292

Please sign in to comment.