From d2cfaeecd935f907ddf3858f908090ab4bda1545 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Fri, 24 Oct 2025 10:35:58 +1100 Subject: [PATCH] Updating contributing guide to be correct --- .github/pull_request_template.md | 4 +++- .github/workflows/contributors.yml | 4 +++- .github/workflows/validate-readme.yml | 13 ++++++++----- CONTRIBUTING.md | 2 +- collections/TEMPLATE.md | 8 ++++---- eng/create-collection.js | 4 ++-- instructions/collections.instructions.md | 4 ++-- package.json | 5 +++-- 8 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 74bb1a1..7ec3ee5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,7 @@ - [ ] The file follows the required naming convention. - [ ] The content is clearly structured and follows the example format. - [ ] I have tested my instructions, prompt, or chat mode with GitHub Copilot. -- [ ] I have run `node update-readme.js` and verified that `README.md` is up to date. +- [ ] I have run `npm start` and verified that `README.md` is up to date. --- @@ -20,6 +20,8 @@ - [ ] New instruction file. - [ ] New prompt file. - [ ] New chat mode file. +- [ ] New collection file. +- [ ] Update to existing instruction, prompt, chat mode, or collection. - [ ] Other (please specify): --- diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index 5ca66b1..13adbaa 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -31,7 +31,9 @@ jobs: PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Regenerate README - run: node update-readme.js + run: | + npm install + npm start - name: Check for changes id: verify-changed-files diff --git a/.github/workflows/validate-readme.yml b/.github/workflows/validate-readme.yml index f0a4e76..ab28d38 100644 --- a/.github/workflows/validate-readme.yml +++ b/.github/workflows/validate-readme.yml @@ -27,11 +27,14 @@ jobs: with: node-version: "20" + - name: Install dependencies + run: npm install + - name: Validate collections - run: node validate-collections.js + run: npm run validate:collections - name: Update README.md - run: node update-readme.js + run: npm start - name: Check for file changes id: check-diff @@ -64,9 +67,9 @@ jobs: message: | ## āš ļø Generated files need to be updated - The `update-readme.js` script detected changes that need to be made. + The update script detected changes that need to be made. - Please run `node update-readme.js` locally and commit the changes before merging this PR. + Please run `npm start` locally and commit the changes before merging this PR.
View diff @@ -79,5 +82,5 @@ jobs: - name: Fail workflow if files need updating if: steps.check-diff.outputs.status == 'failure' run: | - echo "āŒ Generated files need to be updated. Please run 'node update-readme.js' locally and commit the changes." + echo "āŒ Generated files need to be updated. Please run `npm start` locally and commit the changes." exit 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b25f104..6b5a8c4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -183,7 +183,7 @@ For full example of usage checkout edge-ai tasks collection: 1. **Fork this repository** 2. **Create a new branch** for your contribution 3. **Add your instruction, prompt file, chatmode, or collection** following the guidelines above -4. **Run the update script** (optional): `node update-readme.js` to update the README with your new file +4. **Run the update script**: `npm start` to update the README with your new file (make sure you run `npm install` first if you haven't already) - A GitHub Actions workflow will verify that this step was performed correctly - If the README.md would be modified by running the script, the PR check will fail with a comment showing the required changes 5. **Submit a pull request** with: diff --git a/collections/TEMPLATE.md b/collections/TEMPLATE.md index 693e041..7a12f0e 100644 --- a/collections/TEMPLATE.md +++ b/collections/TEMPLATE.md @@ -51,8 +51,8 @@ node create-collection.js my-collection-id 1. Create `collections/my-collection-id.collection.yml` 2. Use the template above as starting point 3. Add your items and customize settings -4. Run `node validate-collections.js` to validate -5. Run `node update-readme.js` to generate documentation +4. Run `npm run validate:collections` to validate +5. Run `npm start` to generate documentation ## Validation @@ -64,7 +64,7 @@ Collections are automatically validated to ensure: Run validation manually: ```bash -node validate-collections.js +npm run validate:collections ``` ## File Organization @@ -78,4 +78,4 @@ Collections don't require reorganizing existing files. Items can be located anyw 3. **Good Descriptions**: Explain who should use the collection and what benefit it provides 4. **Relevant Tags**: Add discovery tags that help users find related collections 5. **Reasonable Size**: Keep collections focused - typically 3-10 items work well -6. **Test Items**: Ensure all referenced files exist and are functional before adding to a collection \ No newline at end of file +6. **Test Items**: Ensure all referenced files exist and are functional before adding to a collection diff --git a/eng/create-collection.js b/eng/create-collection.js index 125c405..695d8af 100755 --- a/eng/create-collection.js +++ b/eng/create-collection.js @@ -166,8 +166,8 @@ display: console.log("\nšŸ“ Next steps:"); console.log("1. Edit the collection manifest to add your items"); console.log("2. Update the name, description, and tags as needed"); - console.log("3. Run 'node validate-collections.js' to validate"); - console.log("4. Run 'node update-readme.js' to generate documentation"); + console.log("3. Run 'npm run validate:collections' to validate"); + console.log("4. Run 'npm start' to generate documentation"); console.log("\nšŸ“„ Collection template contents:"); console.log(template); } catch (error) { diff --git a/instructions/collections.instructions.md b/instructions/collections.instructions.md index e29c2f1..0e4835a 100644 --- a/instructions/collections.instructions.md +++ b/instructions/collections.instructions.md @@ -48,7 +48,7 @@ When working with collections in the awesome-copilot repository: ## Generation Process -- Collections automatically generate README files via `update-readme.js` +- Collections automatically generate README files via `npm start` - Individual collection pages are created in collections/ directory - Main collections overview is generated as README.collections.md -- VS Code install badges are automatically created for each item \ No newline at end of file +- VS Code install badges are automatically created for each item diff --git a/package.json b/package.json index 9fa7b2c..82a03cc 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,15 @@ "name": "awesome-copilot", "version": "1.0.0", "description": "Enhance your GitHub Copilot experience with community-contributed instructions, prompts, and chat modes", - "main": "update-readme.js", + "main": "./eng/update-readme.js", "private": true, "scripts": { "start": "npm run build", "build": "node ./eng/update-readme.js", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate", - "contributors:check": "all-contributors check" + "contributors:check": "all-contributors check", + "validate:collections": "node ./eng/validate-collections.js" }, "repository": { "type": "git",