packages
packages copied to clipboard
feat: Add a weekly workflow to tag archived repos
This commit introduces a new GitHub Actions workflow that runs weekly to identify and tag archived repositories listed in packages.json.
What it does
- Forge Compatibility: Queries repos on Github using the
ghCLI's GraphQL API in batches ofBATCH_SIZE. The GitHub-specific logic is applied to only GitHub URLs, preventing errors with other forges. - Deleted Packages: Packages that are not found on GitHub or are already tagged as 'deleted' are now moved to a new
deleted_packages.jsonfile, keeping the mainpackages.jsonclean. - Archived Packages: Repositories that are archived on GitHub are now explicitly tagged with 'archived' and remain in
packages.json. - Robust URL Parsing: The script now uses
urllib.parseto correctly handle GitHub URLs, stripping any query parameters or fragments. - Dynamic Commits: The workflow now generates a detailed commit message listing the packages that were moved or tagged, and only commits if there are changes.
- Commits the changes to
packages.json. Here is an example commit.
Closes #2075
The Python script doesn't look like it's doing anything that Nim couldn't do just as easily.
Given that this script works and provides value I would do that in another PR.