Shipped a preview-deploy cleaner that saved us a Vercel tier

Open · 3 views · asked by jonas_k · edited

Deletes preview deployments nobody has opened in a month.

We had around nine hundred preview deployments from closed branches, each with its own environment and some with their own database branch. This walks them, checks the branch is merged or gone, and removes them on a schedule.

Copilot wrote the API client. I added a dry-run mode first and left it on for two weeks before trusting it, which turned out to be right: the first pass would have deleted three previews still linked from open pull requests.

Comment

Activity