mikepenz / release-changelog-builder-action

A GitHub action that builds your release notes / changelog fast, easy and exactly the way you want.
https://blog.mikepenz.dev
Apache License 2.0
704 stars 103 forks source link

feature request: `filter_labels` #1018

Closed bjchambers closed 1 year ago

bjchambers commented 1 year ago

I'd like to be able to configure it to only consider PRs with one of a specific set of labels.

The use case would be in a mono-repo, where I'm using the GitHub labeler action to label PRs based on the component(s) they affect. Then I could use a filter_labels to list the labels that indicate a PR should be included.

I found ignore_labels, but if I list all of the components not to include, then any PR that touches multiple components would be excluded from all changelogs, rather than included in the affected component changelogs.

Alternative: Another way this could be achieved (I believe) is specifying an extractor that could say "if none of these labels are present, then add the ignore label".

mikepenz commented 1 year ago

Would exhaustive work for your usecase?

E.g. you could make so that all labels in a category have to be in the PR.

For example if the PR has defined: prod1, prod2, feature

And your feature category for prod1 defines prod1 && feature && exhaustive=true But for prod3 it would not match if it defines prod3 && feature && exhaustive=true

bjchambers commented 1 year ago

Not really well. Some changes may touch two components, in which case it wouldn't match either of the exhaustive lists. Additionally, it could get very repetitive to maintain many of those filters.

That said, I found release drafter did similar things, and automated the labeling for me, so I've started using that. This isn't a blocker for me anymore.

mikepenz commented 1 year ago

Thank you for reporting back. Given that this is no longer a blocker as you moved to release drafter, I'll close this issue.

mikepenz commented 1 year ago
Screenshot 2023-02-26 at 11 46 26

As last note. There's also the API to match categories based on regex rules