Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add more renovate config options #479

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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