Skip to content

Commit

Permalink
chore: add more renovate config options
Browse files Browse the repository at this point in the history
Add more renovate config options.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Dec 16, 2024
1 parent f05fefd commit a0f541b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.\n\nGenerated on 2024-12-16T14:18:24Z by kres 071772c-dirty.\n\n",
"description": "THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.\n\nGenerated on 2024-12-16T15:37:25Z by kres f05fefd-dirty.\n\n",
"prHeader": "Update Request | Renovate Bot",
"extends": [
":dependencyDashboard",
Expand Down
5 changes: 5 additions & 0 deletions internal/output/renovate/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ type CustomManager struct {

// PackageRule represents a package rule.
type PackageRule struct {
Enabled *bool `json:"enabled,omitempty"`
DataSourceTemplate string `json:"datasourceTemplate,omitempty"`
DepNameTemplate string `json:"depNameTemplate,omitempty"`
GroupName string `json:"groupName,omitempty"`
Versioning string `json:"versioning,omitempty"`
VersioningTemplate string `json:"versioningTemplate,omitempty"`

MatchDataSources []string `json:"matchDataSources,omitempty"`
MatchFiles []string `json:"matchFiles,omitempty"`
MatchPaths []string `json:"matchPaths,omitempty"`

MatchPackageNames []string `json:"matchPackageNames,omitempty"`
MatchUpdateTypes []string `json:"matchUpdateTypes,omitempty"`
}
8 changes: 8 additions & 0 deletions internal/project/common/renovate.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ type CustomManager struct {

// PackageRule represents a package rule.
type PackageRule struct {
Enabled *bool `yaml:"enabled,omitempty"`
Versioning string `yaml:"versioning,omitempty"`
MatchDataSources []string `yaml:"matchDataSources,omitempty"`
MatchFiles []string `yaml:"matchFiles,omitempty"`
MatchPaths []string `yaml:"matchPaths,omitempty"`
MatchPackageNames []string `yaml:"matchPackageNames,omitempty"`
}

Expand Down Expand Up @@ -69,6 +73,10 @@ func (r *Renovate) CompileRenovate(o *renovate.Output) error {
}))
o.PackageRules(xslices.Map(r.PackageRules, func(pr PackageRule) renovate.PackageRule {
return renovate.PackageRule{
Enabled: pr.Enabled,
MatchDataSources: pr.MatchDataSources,
MatchFiles: pr.MatchFiles,
MatchPaths: pr.MatchPaths,
MatchPackageNames: pr.MatchPackageNames,
Versioning: pr.Versioning,
}
Expand Down

0 comments on commit a0f541b

Please sign in to comment.