Skip to content

Commit

Permalink
Adapt json
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian committed Nov 18, 2024
1 parent 54385e3 commit 911becc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions scripts/remove-incompatible-packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ def main() -> None:

# Create a commit and push it
branch_name = f"delete-{recipe.name.replace('_', '-')}"
switch_result = subprocess.run(["git", "switch", "--create", branch_name])
if switch_result.returncode == 128:
eprint(f"Branch '{branch_name}' already exists, skipping")
continue
else:
switch_result.check_returncode()

subprocess.run(["git", "switch", "--create", branch_name], check=True)
subprocess.run(
["git", "config", "--global", "user.name", "github-actions[bot]"],
check=True,
Expand Down Expand Up @@ -86,6 +80,13 @@ def main() -> None:
title = f"Delete {recipe}"
pr = repo.create_pull(title=title, body=body, head=branch_name, base="main")
print(f"Created PR: {pr.html_url}")

# Remove the failed_at entry for this recipe
del failed_compatibility[recipe.name]

# Save the updated failed compatibility data
with failed_compatibility_file.open("w") as file:
yaml.safe_dump(failed_compatibility, file)
except Exception as e:
# If there's an error, print it and move on to the next recipe
eprint(f"Error processing {recipe}: {e}")
Expand Down

0 comments on commit 911becc

Please sign in to comment.