keep min package versions from deletion#52
Conversation
|
@NamrataJha - pls add more details to description as to how the new features of Action can be used, its spec, etc. |
|
@NamrataJha - pls work with @jcansdale for any feedback |
|
Have added an additional option |
jcansdale
left a comment
There was a problem hiding this comment.
I think we should be a little more conservative about what versions we default to keeping. See inline comment for suggestion.
|
@jcansdale as per our discussion have updated to the action to-
@AmrutaKawade Have made the above changes in the action and updated the README.md. Please review this once. |
README.md
Outdated
| # Cannot be more than 100 | ||
| min-versions-to-keep: | ||
|
|
||
| # The package versions to ignore exclude from deletion. |
There was a problem hiding this comment.
can we update the text to suggest that we are supporting regex here.
There was a problem hiding this comment.
Sure will make the change.
jcansdale
left a comment
There was a problem hiding this comment.
Suggestions to make the new functionality more prominent/discoverable.
README.md
Outdated
| * Delete version(s) of a package that is hosted in a different repo than the one executing the workflow | ||
| * Delete maximum possible package versions except n latest versions | ||
| * Ignore some versions based on name from deletion | ||
| * Delete only pre-release versions |
There was a problem hiding this comment.
Could we say something like this:
- Create a retention policy (delete all except n most recent pre-release versions)
And move this more common scenario to the top.
README.md
Outdated
| - [Delete all except y latest versions of a package hosted in a different repo than the workflow](#delete-all-except-y-latest-versions-of-a-package-hosted-in-a-different-repo-than-the-workflow) | ||
| - [Delete oldest x number of versions while ignoring particular package versions in the same repo as the workflow](#delete-oldest-x-number-of-versions-while-ignoring-particular-package-versions-in-the-same-repo-as-the-workflow) | ||
| - [Delete all except y latest versions while ignoring particular package versions in the same repo as the workflow](#delete-all-except-y-latest-versions-while-ignoring-particular-package-versions-in-the-same-repo-as-the-workflow) | ||
| - [Delete only pre-release package versions except y no of pre-release package versions in the same repo as the workflow](#delete-only-pre-release-package-versions-except-y-no-of-pre-release-package-versions-in-the-same-repo-as-the-workflow) |
There was a problem hiding this comment.
Can we move these two to the top?
I suspect the current top one, Delete a specific version of a package, is rarely if ever used! 😉
This PR adds
min-versions-to-keepoption for setting a lower limit on package versions while deleting.ignore-versionsoption to set regex for packages to be ignored while deletion.delete-only-pre-release-versionsoption to delete only the pre-release versions for a packageNew Feature
min-versions-to-keepattribute with the action workflow.num-old-versions-to-deletepackage versions will get deleted.min-versions-to-keepis set to any value greater than 0, it will delete maximum possible package versions exceptmin-versions-to-keeppackage versions.ignore-versionsattribute within the action workflow.delete-only-pre-release-versionsattribute with the action workflow."false"."true", number of pre-release versions to keep can be set usingmin-versions-to-keepwith this option.What to Test
actions/delete-package-versions@6fee3def5eefbcb45b0ab364630c00099189e727to use the changes.min-versions-to-keepignore-versionsanddelete-only-pre-release-versionsand see if the behaviour is expected.