packages icon indicating copy to clipboard operation
packages copied to clipboard

feat: Add a weekly workflow to tag archived repos

Open esafak opened this issue 4 months ago • 2 comments

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 gh CLI's GraphQL API in batches of BATCH_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.json file, keeping the main packages.json clean.
  • 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.parse to 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

esafak avatar Aug 11 '25 05:08 esafak

The Python script doesn't look like it's doing anything that Nim couldn't do just as easily.

Araq avatar Aug 12 '25 07:08 Araq

Given that this script works and provides value I would do that in another PR.

esafak avatar Aug 12 '25 13:08 esafak