Closed kzu closed 3 years ago
Would it work to set a rule to keep 5 packages per first semver release label? Or potentially, the first X semver release labels (ex: 2 -> 1.0.0-first.second.XXX.YYY.ZZZZ)
That way each prXXX would get it's own limit without knowing the name ahead of time, or putting all pr* together if it were a regex.
I'm evaluating using the patch part to hold the PR number for that particular scenario
What do you mean? Using x.y.Z going by Z instead of the release label?
Glad to hear retention is useful for you. I kept it simple at first with the intention of expanding it for scenarios like this once I got more feedback on it. I think going by release labels for branches/PRs sounds like a great feature.
Yeah, having the limit apply within first label would suffice :).
Yeah, I was going to try to workaround this by setting Z as the patch instead of appending to the label, but much better to have per-(first) label retention 💯
Hi @emgarten, I love the retention feature!
I have a particular version scheme I use in some repos, where I push packages from all branches and PRs with a naming like
42.42.42-[branch].[commits]
. In case of a PR, the[branch]
becomespr[number]
. This means that it's quite common to have several like:Since the versions are fixed (I only version "properly" when labeling/creating a GH release, in this case), pretty much everything are prerelease versions. So I'd need a little more granularity on the retention rule for that.
What I'd like to have is a X prerelease versions per label, where choosing (say) 5, will keep 5 versions from all prerelease labels.
I know this is a tricky approach because semver2-wise, there can be arbitrary labels "parts" (i.e.
-features-area-foo.25
).Thoughts?
PS: I'm evaluating using the patch part to hold the PR number for that particular scenario, but that would still not fix the scenario since lots of PRs could still cause the
-main
(or feature branches) packages to be pruned.