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

Support updating aqua-renovate-config in config preset(default.json) #448

Closed
mikutas opened this issue Nov 21, 2023 · 5 comments · Fixed by #449
Closed

Support updating aqua-renovate-config in config preset(default.json) #448

mikutas opened this issue Nov 21, 2023 · 5 comments · Fixed by #449
Labels
enhancement New feature or request
Milestone

Comments

@mikutas
Copy link
Contributor

mikutas commented Nov 21, 2023

For now updating aqua-renovate-config in default.json isn't supported.
default.json is recommended filename of config presets.

@suzuki-shunsuke
Copy link
Member

Thank you for your proposal.
I'm concerned that default.json is a common file name and this isn't necessarily a Renovate config presets.

I come up with the idea that adding a new preset to update aqua-renovate-config.

e.g.

{
  "extends": [
    "github>aquaproj/aqua-renovate-config:aqua-renovate-config#1.13.0(default\\.json)"
  ]
}

Using this preset, we can support Renovate preset not only default.json but also other file names.

What do you think?

@suzuki-shunsuke
Copy link
Member

  1. Define aquaRenovateConfigPreset in utils.libsonnet
  aquaRenovateConfigPreset: {
    // Update aqua-renovate-config
    matchStrings: [
      '"github>aquaproj/aqua-renovate-config#(?<currentValue>[^" \\n\\(]+)',
      '"github>aquaproj/aqua-renovate-config:.*#(?<currentValue>[^" \\n\\(]+)',
      '"github>aquaproj/aqua-renovate-config/.*#(?<currentValue>[^" \\n\\(]+)',
    ],
    datasourceTemplate: 'github-releases',
    depNameTemplate: 'aquaproj/aqua-renovate-config',
  },
  1. Add jsonnet/aqua-renovate-config.jsonnet
  2. Refer to aquaRenovateConfigPreset in default.jsonnet and aqua-renovate-config.jsonnet
local utils = import 'utils.libsonnet';

{
  regexManagers: [
    utils.aquaRenovateConfigPreset + {
      fileMatch: [
        '{{arg0}}',
      ],
    },
  ],
}

@suzuki-shunsuke suzuki-shunsuke added this to the 1.13.0 milestone Nov 21, 2023
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Nov 21, 2023
@suzuki-shunsuke
Copy link
Member

1.13.0 is out 🎉
https://github.com/aquaproj/aqua-renovate-config/releases/tag/1.13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants