Skip to content

Commit

Permalink
patch for github bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Chizkiyahu committed Nov 12, 2023
1 parent 7e8f122 commit c14092d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clean_ghcr.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def get_list_packages(owner, repo_name, owner_type, package_names):
pkgs = get_req(
f"/{owner_type}s/{owner}/packages?package_type=container")

# this is a strange bug in github api, it returns deleted packages
# I open a ticket for that
pkgs = [pkg for pkg in pkgs if not pkg["name"].startswith('deleted_')]
if repo_name:
pkgs = [
pkg for pkg in pkgs if pkg.get("repository")
Expand Down

0 comments on commit c14092d

Please sign in to comment.