Skip to content

Commit

Permalink
fix: renovate preamble
Browse files Browse the repository at this point in the history
Also add `allowedVersions` field.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Dec 17, 2024
1 parent 318187b commit b9507d6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
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-16T15:37:25Z by kres f05fefd-dirty.\n\n",
"description": "THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.",
"prHeader": "Update Request | Renovate Bot",
"extends": [
":dependencyDashboard",
Expand Down
4 changes: 1 addition & 3 deletions internal/output/renovate/renovate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ func NewOutput() *Output {

o.FileWriter = o

preamble := output.Preamble("")

o.result = &Renovate{
Schema: "https://docs.renovatebot.com/renovate-schema.json",
Description: preamble,
Description: "THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.",
Extends: []string{
":dependencyDashboard",
":gitSignOff",
Expand Down
1 change: 1 addition & 0 deletions internal/output/renovate/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type CustomManager struct {
// PackageRule represents a package rule.
type PackageRule struct {
Enabled *bool `json:"enabled,omitempty"`
AllowedVersions string `json:"allowedVersions,omitempty"`
DataSourceTemplate string `json:"datasourceTemplate,omitempty"`
DepNameTemplate string `json:"depNameTemplate,omitempty"`
GroupName string `json:"groupName,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions internal/project/common/renovate.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type CustomManager struct {
// PackageRule represents a package rule.
type PackageRule struct {
Enabled *bool `yaml:"enabled,omitempty"`
AllowedVersions string `yaml:"allowedVersions,omitempty"`
Versioning string `yaml:"versioning,omitempty"`
MatchDataSources []string `yaml:"matchDataSources,omitempty"`
MatchFileNames []string `yaml:"matchFileNames,omitempty"`
Expand Down Expand Up @@ -74,6 +75,7 @@ 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,
AllowedVersions: pr.AllowedVersions,
MatchDataSources: pr.MatchDataSources,
MatchFileNames: pr.MatchFileNames,
MatchPaths: pr.MatchPaths,
Expand Down

0 comments on commit b9507d6

Please sign in to comment.