changie icon indicating copy to clipboard operation
changie copied to clipboard

Define projects using patterns

Open thompson-tomo opened this issue 3 months ago • 3 comments

Is your feature request related to a problem? Please describe. In OpenTelemetry some of our contrib repos can contain a lot of projects and as such needing to list each project can lead to a bloated file and harder to mantain

Describe the solution you'd like I want to be able use patterns in my project config to reduce my config and allow for easy scaling.

projects:
  - label: *
    changelog: src/*/CHANGELOG.md

In the above * represents the name of a folder and the value would be the label converted to lower-case with spaces replaced with underscores.

Describe alternatives you've considered Dynamically generating the config using scripts.

Additional context N/a

thompson-tomo avatar Nov 29 '25 03:11 thompson-tomo

Hmm, I wonder if wrapping these in go templates would work. The issue would still be around converting a single element on yaml to many. Not sure yet.

miniscruff avatar Dec 02 '25 19:12 miniscruff

What I was thinking was when determining the list of projects to process if a project contains a * it is removed from the list and in its place the resolved projects added.

thompson-tomo avatar Dec 03 '25 11:12 thompson-tomo

What I was thinking was when determining the list of projects to process if a project contains a * it is removed from the list and in its place the resolved projects added.

Ah, just like a glob pattern, I see. I will think about this.

miniscruff avatar Dec 03 '25 17:12 miniscruff

Ok more thoughts.

Glob is ok, it can return multiple matches but I guess that's fine. Assuming lower case and space replacements would be too much, but you could go template the key and name.

miniscruff avatar Dec 11 '25 01:12 miniscruff

Correct, I would want the glob to return many matches. Agree the best solution would be templated name & key but also happy to auto generate ie lower case & replace spaces in keys. Perhaps that could be a default template if none specified.

thompson-tomo avatar Dec 11 '25 12:12 thompson-tomo

https://github.com/miniscruff/changie/discussions/610 I think the v2 format expands ( or will ) the project config to be a bit more universal.

miniscruff avatar Dec 12 '25 01:12 miniscruff