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

fix: renovate preamble. #481

Merged
merged 1 commit into from
Dec 17, 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-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