This script
- Uses the Phabricator differential.query API (https://phab.comm.dev/conduit/method/differential.query/) to determine which revisions of diffs are no longer relevant (because the diffs have been closed or abandoned)
- Writes a new shell script with a series of git commands to remove the git tags associated with those no longer relevant revisions.
The way this script will be used on the CI will be something like:
cd scripts && node generate-phab-removal-script.js chmod +x tag_removal_script.sh ./tag_removal_script.sh