A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
JavaScript claude-code-pluginclaude-code-skillscode-appsgithub-copilot-pluginpower-appspower-pagespower-platform
Add plugin name validation workflow (#73)
Priyanshu Agrawal56645edc644a
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 5e837f697..b76a1ad03 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -49,7 +49,7 @@]},{- "name": "code-apps (preview)",+ "name": "code-apps-preview","source": "./plugins/code-apps","description": "Build and deploy Power Apps code apps using React, Vite, and Power Platform connectors","category": "development",@@ -66,4 +66,3 @@}]}-diff --git a/.github/workflows/validate-plugin-names.yml b/.github/workflows/validate-plugin-names.ymlnew file mode 100644index 000000000..96536d4ec--- /dev/null+++ b/.github/workflows/validate-plugin-names.yml@@ -0,0 +1,56 @@+name: validate-plugin-names++on:+ push:+ branches:+ - main+ workflow_dispatch:++jobs:+ validate-plugin-names:+ name: validate-plugin-names+ runs-on: ubuntu-latest+ steps:+ - name: checkout+ uses: actions/checkout@v4++ - name: validate-kebab-case-plugin-names+ shell: bash+ run: |+ python3 <<'PY'+ import json+ import re+ from pathlib import Path++ KEBAB_CASE_PATTERN = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*$")+++ def validate_name(name, source):+ if KEBAB_CASE_PATTERN.fullmatch(name):+ return None+ return f"{source}: '{name}' is not kebab-case"+++ errors = []++ marketplace_path = Path(".claude-plugin/marketplace.json")+ marketplace = json.loads(marketplace_path.read_text())+ for index, plugin in enumerate(marketplace.get("plugins", [])):+ error = validate_name(plugin["name"], f"{marketplace_path} plugins[{index}].name")+ if error:+ errors.append(error)++ for plugin_manifest_path in sorted(Path("plugins").glob("*/.claude-plugin/plugin.json")):+ plugin_manifest = json.loads(plugin_manifest_path.read_text())+ error = validate_name(plugin_manifest["name"], f"{plugin_manifest_path} name")+ if error:+ errors.append(error)++ if errors:+ print("Found plugin names that are not kebab-case:")+ for error in errors:+ print(f"- {error}")+ raise SystemExit(1)++ print("All plugin names are kebab-case.")+ PYdiff --git a/plugins/code-apps/.claude-plugin/plugin.json b/plugins/code-apps/.claude-plugin/plugin.jsonindex 3f454a959..bafc27f38 100644--- a/plugins/code-apps/.claude-plugin/plugin.json+++ b/plugins/code-apps/.claude-plugin/plugin.json@@ -1,5 +1,5 @@{- "name": "code-apps (preview)",+ "name": "code-apps-preview","version": "1.0.0","description": "Build and deploy Power Apps code apps using React, Vite, and Power Platform connectors.","author": {