Podcast Lookup

Capgo Pull Request Preview Cleanup Api Key

Capgo Live Updates

  • November 16, 2026
Episode page

About this episode

The episode explains why using a dedicated, restricted API key for Capgo pull‑request preview cleanup is critical. It walks through the risks of reusing a master key, such as exposing credentials in logs and granting excessive permissions, and shows how to create a clearly named “CAPGO‑PREVIEW‑CLEANUP‑KEY” stored in a vault. Listeners learn the step‑by‑step process of safely deleting preview bundles: verify the PR is closed, confirm no active uploads, instruct devices to detach, then delete the server resources only after all checks pass. The discussion also covers how to avoid catastrophic wildcard deletions by fetching exact bundle IDs, implementing three security gates (format, channel alignment, commit SHA verification), handling race conditions between cleanup and deployment jobs, and enforcing strict logging hygiene. Finally, it stresses double‑checking that only targeted previews are removed and that production bundles remain untouched, embodying the principle of failing closed. Topics: - Create a limited‑scope API key and store it securely - Use exact bundle IDs instead of name‑based wildcards - Apply three validation gates before deletion - Coordinate device detachment and server cleanup to prevent crashes - Log actions without exposing credentials and verify final state Full article https://capgo.app/blog/capgo-pull-request-preview-cleanup-api-key/