diff options
| author | Daisy S. Hollman <thewholedaisy@gmail.com> | 2026-07-03 17:18:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-03 19:18:32 -0500 |
| commit | 66dacfc45626098fd08f1ccb99edbdb9b0bc22b0 (patch) | |
| tree | a29668493f6948521bbd3acf2989989c4344965a | |
| parent | 7e287ffe95563466c27ef67452e6eb7b02838081 (diff) | |
ci: fail validate when a plugin name is removed without a renames entry (#3177)daisy/plugin-renames/backfill
Adds a step to the validate job that diffs plugins[].name against the
PR base and fails if any name disappeared without a corresponding key
in the top-level "renames" map. Prevents the next airwallex-style
plugin-not-found regression.
Part of CC-2871. Depends on the renames map (PR A).
Co-authored-by: Claude <noreply@anthropic.com>
| -rw-r--r-- | .github/workflows/validate-plugins.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.github/workflows/validate-plugins.yml b/.github/workflows/validate-plugins.yml index da9bdf2f..77cb5658 100644 --- a/.github/workflows/validate-plugins.yml +++ b/.github/workflows/validate-plugins.yml @@ -38,6 +38,25 @@ jobs: with: fetch-depth: 0 + - name: Check for renamed plugins without renames entry + run: | + set -euo pipefail + base="${{ github.event.pull_request.base.sha || 'origin/main' }}" + # Names removed from plugins[] in this diff + removed=$(comm -23 \ + <(git show "$base:.claude-plugin/marketplace.json" | jq -r '.plugins[].name' | sort) \ + <(jq -r '.plugins[].name' .claude-plugin/marketplace.json | sort)) + [ -z "$removed" ] && { echo "No plugin names removed."; exit 0; } + # Renames keys present in HEAD + rename_keys=$(jq -r '.renames // {} | keys[]' .claude-plugin/marketplace.json | sort) + missing=$(comm -23 <(echo "$removed" | sort) <(echo "$rename_keys")) + if [ -n "$missing" ]; then + echo "::error::Plugin name(s) removed without a renames entry: $missing" + echo "Add to .claude-plugin/marketplace.json top-level \"renames\": {\"<old>\": \"<new>\"} (or null if intentionally removed)." + exit 1 + fi + echo "All removed names have renames entries." + - uses: anthropics/claude-plugins-community/.github/actions/validate-plugins@426e469f322952061102b286b378c0c9733a0934 with: marketplace-path: .claude-plugin/marketplace.json |
