Prune old releases automatically, keep the newest 3 #16
Loading…
Reference in a new issue
No description provided.
Delete branch "d/release-retention"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Claude AI Code Review
Summary — Adds best-effort retention logic to the release workflow to prune all but the newest 3 releases, keeping tags intact.
Code Quality ⭐⭐⭐⭐☆
Sensible use of a try/catch to ensure pruning never breaks a release, with a clear comment explaining tag preservation.
Issues
🟢
release.yml— pagination cap:?limit=50assumes fewer than 50 releases exist. If more accumulate, older ones beyond page 1 won't be enumerated (harmless here since you're pruning down, but the newest-3 sort is only correct within the returned page).Best-effort pruning is correctly isolated so it can't fail a release. The limit assumption is acceptable given the retention intent.
📊 Tokens: 1194 input + 279 output | 💰 Cost: ~$0.0129
Generated by Claude Opus 4.8 via Gitea Actions