diff --git a/run/deployment-previews/check_status.py b/run/deployment-previews/check_status.py index f8bad90299d..a1e10bfa21e 100644 --- a/run/deployment-previews/check_status.py +++ b/run/deployment-previews/check_status.py @@ -144,6 +144,11 @@ def cleanup( service_obj = get_service(project_id, region, service) revs = get_revision_tags(service_obj) + revs = [ + element for index, element in enumerate(revs) + if (element["tag"].startswith("pr-")) + ] + if not revs: click.echo("No revision tags found, nothing to clean up") sys.exit(0)