ability to exclude backported PRs
minrk opened this issue · comments
Context
In several of our projects, we backport fixes to a previous release while working on a major release in main - it would be useful to be able to exclude the backported PR so the change doesn't appear twice or give the misleading indication that a feature or bugfix originally made on the development branch for 4.0 was not also released in e.g. 3.1.
For example, in making the changelog for JupyterHub 4.0, I get in the enhancements:
- Backport PR #4303 on branch 3.x (make sure event-schemas are installed) #4317 (@minrk)
- Backport PR #4302: sqlalchemy 2 compatibility #4315 (@minrk)
- make sure event-schemas are installed #4303 (@minrk, @consideRatio)
- sqlalchemy 2 compatibility #4302 (@minrk, @meeseeksdev)
when none of these should be included as changes in 4.0.
so each backported change is present twice, when what I want is for none of these 4 entries. (-b main
excludes the backports, but I currently like to include them because it helps with the manual deletions of the duplicates!)
Proposal
A simple version would be to allow excluding on a specific label (or label pattern). Doing this by default might present problems, because the exclusions might be the opposite of what you want for the backport release. If you use backport-pr tools like mrmeeseeks (or manual backporting with a separate PR), though, this shouldn't be an issue because the change already appears twice as two separate PRs, and only the 'mainline' PR should be excluded, which would be the one with the label.
Tasks and updates
- decide how to identify backport prs
- decide what to do by default
- implement exclusions (and options, if any)