Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Plugin Submission Checklist

- [ ] Plugin ID follows format: `author.plugin-name` or lowercase-with-hyphens
- [ ] Manifest passes `npm run validate-plugins` (or `npm run validate-all`)
- [ ] Plugin JSON is valid (CI will validate automatically)
- [ ] SHA256 checksum verified (if `distribution` with checksums is used)
- [ ] Plugin tested locally
- [ ] README / docs updated if adding new author or changing structure
Expand All @@ -26,3 +26,5 @@
## DCO

By submitting this pull request, I certify that my contributions are made under the terms of the [Developer Certificate of Origin](https://developercertificate.org/). All commits are signed off with `git commit -s`.

**Note:** DCO requires a valid email address that matches your Git commit author email. See [CONTRIBUTING.md](../CONTRIBUTING.md#developer-certificate-of-origin-dco) for details.
92 changes: 92 additions & 0 deletions .github/workflows/build-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build Registry

on:
push:
branches:
- main
paths:
- 'plugins/**'
- 'schemas/**'
paths-ignore:
- 'registry.json'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: |
npm install

- name: Validate schema files
run: |
npm run validate-schemas

- name: Validate individual plugin files
run: |
npm run validate-plugins

- name: Build registry
run: |
npm run build

- name: Validate registry
run: |
npm run validate

- name: Validate repository URLs
run: |
node -e "
const fs = require('fs');
const registry = JSON.parse(fs.readFileSync('registry.json', 'utf8'));
const https = require('https');
const http = require('http');

async function checkUrl(url) {
return new Promise((resolve) => {
const client = url.startsWith('https') ? https : http;
const req = client.get(url, { timeout: 5000 }, (res) => {
resolve(res.statusCode === 200 || res.statusCode === 301 || res.statusCode === 302);
});
req.on('error', () => resolve(false));
req.on('timeout', () => {
req.destroy();
resolve(false);
});
});
}

(async () => {
for (const plugin of registry.plugins) {
if (plugin.repository) {
const valid = await checkUrl(plugin.repository);
if (!valid) {
console.warn('Warning: Repository URL may be invalid:', plugin.repository);
}
}
}
console.log('Repository URL validation complete');
})();
"

- name: Commit registry.json
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add registry.json
if git diff --staged --quiet; then
echo "No changes to registry.json"
else
git commit -m "chore: update registry.json [skip ci]"
git push
fi
8 changes: 3 additions & 5 deletions .github/workflows/validate-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
- name: Check for duplicates
run: npm run check-duplicates

- name: Build registry
run: npm run build

- name: Validate registry
run: npm run validate
- name: Validate registry (if exists)
run: |
npm run validate || echo "⚠️ registry.json not found, skipping validation"
54 changes: 6 additions & 48 deletions .github/workflows/validate-registry.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Validate Registry

on:
push:
branches:
- main
paths:
- 'registry.json'
- 'plugins/**'
- 'schemas/**'
pull_request:
paths:
- 'registry.json'
Expand Down Expand Up @@ -38,45 +31,10 @@ jobs:
run: |
npm run validate-plugins

- name: Build registry
run: |
npm run build

- name: Validate registry
run: |
npm run validate

- name: Validate repository URLs
- name: Validate registry (if exists)
run: |
node -e "
const fs = require('fs');
const registry = JSON.parse(fs.readFileSync('registry.json', 'utf8'));
const https = require('https');
const http = require('http');

async function checkUrl(url) {
return new Promise((resolve) => {
const client = url.startsWith('https') ? https : http;
const req = client.get(url, { timeout: 5000 }, (res) => {
resolve(res.statusCode === 200 || res.statusCode === 301 || res.statusCode === 302);
});
req.on('error', () => resolve(false));
req.on('timeout', () => {
req.destroy();
resolve(false);
});
});
}

(async () => {
for (const plugin of registry.plugins) {
if (plugin.repository) {
const valid = await checkUrl(plugin.repository);
if (!valid) {
console.warn('Warning: Repository URL may be invalid:', plugin.repository);
}
}
}
console.log('Repository URL validation complete');
})();
"
if [ -f registry.json ]; then
npm run validate
else
echo "⚠️ registry.json not found, skipping validation"
fi
Loading
Loading