-
Notifications
You must be signed in to change notification settings - Fork 141
Description
First I would like to describe my problem, and try to come with a suggestion:
Originally posted at: semantic-release/semantic-release#1603
but posting here as it seems more fit:
so to get our prerelease (
next) branch up-to-date, I did as you suggested, and merged ourmain/latestbranch into it. Nowsemantic-releasesent out a comment to ALL minor bugfix issues/PRs made to themain- those have already been closed and released - when it published a newnextrelease 👀. Is it possible to avoid that somehow? Those changes have already been released, whysemantic-releaseis so eager to comment/send out notifications on those again? 😕
It now generated over 100 comments on already closed/handled issues, and I have no idea why. 😢
Will those be re-released a third time now when I merge them back tomain? 😨
The repo in question: https://github.com/nextauthjs/next-auth
Our config is fairly simple:
"release": {
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
{
"name": "beta",
"prerelease": true
},
{
"name": "next",
"prerelease": true
}
]
},Is there any configuration that could prohibit semantic-release to dig up already closed/merged labeled/commented issues/PRs, and only comment/label those that haven't been done so before? 🤔
If currently there is no way of achieving this, here is my suggestion:
I studied the following file:
https://github.com/semantic-release/github/blob/master/lib/success.js
And it would be nice to have an option to filter the issues/prs, before sending out a comment, something like this:
successFilter: (pr) => !pr.labels.some(label => label.name.includes("released"))This should restrict the PRs to only those that don't have a label yet containing "released"
Ref: https://docs.github.com/en/rest/reference/search#search-issues-and-pull-requests