Skip to content

Commit 72c451a

Browse files
bthosbthos
andauthored
Rename validation command in package.json from validate-all to validate-files for clarity. Update README.md to reflect the new command and provide additional context on the validation process. Modify GitHub Actions workflow to clarify that changes to registry.json won't trigger the build workflow, preventing infinite loops. (#16)
Signed-off-by: bthos <el.mogul@outlook.es> Co-authored-by: bthos <el.mogul@outlook.es>
1 parent 9cf03fd commit 72c451a

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

.github/workflows/build-registry.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
paths:
88
- 'plugins/**'
99
- 'schemas/**'
10-
paths-ignore:
11-
- 'registry.json'
10+
# Note: registry.json is in root and doesn't match these patterns,
11+
# so changes to it won't trigger this workflow (preventing infinite loops)
1212

1313
jobs:
1414
build:
@@ -18,25 +18,6 @@ jobs:
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 0
23-
24-
- name: Check for registry.json modifications
25-
run: |
26-
echo "Checking if registry.json was modified in this PR..."
27-
28-
# Get the base branch (main)
29-
BASE_SHA=$(git merge-base origin/main HEAD)
30-
31-
# Check if registry.json was modified between base and HEAD
32-
if git diff --name-only $BASE_SHA HEAD | grep -q '^registry\.json$'; then
33-
echo "::error::registry.json was modified in this PR. Please remove it from your commit."
34-
echo "::error::CI automatically builds and commits registry.json after PR merge."
35-
echo "::error::See CONTRIBUTING.md for details."
36-
exit 1
37-
fi
38-
39-
echo "✓ No registry.json modifications found"
4021

4122
- name: Setup Node.js
4223
uses: actions/setup-node@v4

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,13 @@ Validate the aggregated registry (requires registry.json to exist - run `npm run
312312
npm run validate
313313
```
314314

315-
Validate everything (schemas, plugins, and existing registry.json if present):
315+
Validate existing files (schemas, plugins, and registry.json if present):
316316

317317
```bash
318318
npm run validate-files
319319
```
320320

321-
This runs: `validate-schemas``validate-plugins``validate` (skips registry validation if registry.json doesn't exist)
321+
This runs: `validate-schemas``validate-plugins``validate` (skips registry validation if registry.json doesn't exist). Note: This does not build the registry - run `npm run build` first if you need to generate registry.json.
322322

323323
Check for duplicate plugin IDs:
324324

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"validate": "node scripts/validate.js",
99
"validate-plugins": "node scripts/validate-plugins.js",
1010
"validate-schemas": "node scripts/validate-schemas.js",
11-
"validate-all": "npm run validate-schemas && npm run validate-plugins && npm run validate",
11+
"validate-files": "npm run validate-schemas && npm run validate-plugins && npm run validate",
1212
"format": "node scripts/format.js",
1313
"check-duplicates": "node scripts/check-duplicates.js",
1414
"create-plugin": "node scripts/create-plugin.js",

0 commit comments

Comments
 (0)