Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Minimum number of releases retained with retention policy is unclear #4018
For lifecycle release retention policies, you have the option of specifying the number of releases that you wish to retain.
The minimum number of previous releases that you can specify is 1. If you change the number of releases to 0 and click save, then when the page reloads, it will have automatically changed the selection to "Keep All".
This is a reasonable minimum value, because if we allowed people to set the minimum to 0, then a release might be deleted after someone has created it, but before they have deployed it.
On top of this, we keep extra releases around. I believe we keep any releases that are shown on the dashboard, which means the current release, and the previous release. Conceptually, we keep all releases on the dashboard, plus additionally the number of releases specified in the retention policy. So a retention policy of "Keep last 1 release" actually keeps 3 releases.
None of these caveats are made obvious in the UI. We should consider changing the control somehow. Perhaps we could add more details and links to documentation. Perhaps we should make the minimum number of releases that you can retain 3, to better reflect what we are doing behind the scenes.