|
| 1 | +# Add New Script to README.md |
| 2 | + |
| 3 | +You are helping to add a new script to the appropriate README.md file in this repository while ensuring it passes the lint-readme.js validation. |
| 4 | + |
| 5 | +## Context |
| 6 | + |
| 7 | +This repository contains GitHub-related scripts organized in different directories: |
| 8 | + |
| 9 | +- `gh-cli/` - Scripts using GitHub CLI |
| 10 | +- `api/` - Scripts using direct API calls |
| 11 | +- `scripts/` - General utility scripts |
| 12 | +- `graphql/` - GraphQL-specific scripts |
| 13 | + |
| 14 | +Each directory has its own README.md that documents the scripts in that directory. |
| 15 | + |
| 16 | +## Requirements |
| 17 | + |
| 18 | +When adding a new script entry to a README.md, you must ensure it meets these criteria from `lint-readme.js`: |
| 19 | + |
| 20 | +### 1. Alphabetical Order |
| 21 | + |
| 22 | +- Script entries must be in alphabetical order within the "Scripts" section |
| 23 | +- Use the appropriate heading level (### for gh-cli, ## for other directories) |
| 24 | +- Check existing entries to maintain proper ordering |
| 25 | + |
| 26 | +### 2. Naming Convention |
| 27 | + |
| 28 | +- Script names must follow kebab-case convention |
| 29 | +- Avoid short words like "repo" (use "repository"), "org" (use "organization") |
| 30 | +- File extensions should be included (.sh, .ps1, .js, .py, etc.) |
| 31 | + |
| 32 | +### 3. Required Information |
| 33 | + |
| 34 | +Each script entry must include: |
| 35 | + |
| 36 | +- **Heading**: `### script-name.sh` (or appropriate extension) |
| 37 | +- **Description**: Brief explanation of what the script does |
| 38 | +- **Usage examples**: If applicable, show how to run the script |
| 39 | +- **Notes/Warnings**: Any important information about prerequisites, permissions, or limitations |
| 40 | + |
| 41 | +### 4. File Existence |
| 42 | + |
| 43 | +- Only add entries for scripts that actually exist in the repository |
| 44 | +- The script file must be committed to Git (not just local files) |
| 45 | + |
| 46 | +## Template Format |
| 47 | + |
| 48 | +Use this template when adding a new script entry: |
| 49 | + |
| 50 | +```markdown |
| 51 | +### script-name.sh |
| 52 | + |
| 53 | +Brief description of what the script does. |
| 54 | + |
| 55 | +Usage: |
| 56 | + |
| 57 | +\`\`\`shell |
| 58 | +./script-name.sh <parameter1> <parameter2> |
| 59 | +\`\`\` |
| 60 | + |
| 61 | +Additional details, examples, or notes if needed. |
| 62 | + |
| 63 | +> [!NOTE] |
| 64 | +> Any important notes about requirements or limitations. |
| 65 | +``` |
| 66 | + |
| 67 | +## Process |
| 68 | + |
| 69 | +1. **Identify the correct directory** where the script belongs |
| 70 | +2. **Check the existing README.md** in that directory for formatting patterns |
| 71 | +3. **Find the correct alphabetical position** for the new entry |
| 72 | +4. **Add the script entry** using the template above |
| 73 | +5. **Verify the entry** includes all required information |
| 74 | + |
| 75 | +## Validation |
| 76 | + |
| 77 | +After adding the script entry, the lint-readme.js will check: |
| 78 | + |
| 79 | +- ✅ Script exists in the repository and is committed |
| 80 | +- ✅ Entry is in alphabetical order |
| 81 | +- ✅ Follows kebab-case naming convention |
| 82 | +- ✅ Uses appropriate heading level |
| 83 | +- ✅ Avoids short words in file names |
| 84 | + |
| 85 | +## Examples |
| 86 | + |
| 87 | +Good script entry: |
| 88 | + |
| 89 | +```markdown |
| 90 | +### get-organization-repositories.sh |
| 91 | + |
| 92 | +Gets a list of all repositories in an organization with optional filtering. |
| 93 | + |
| 94 | +Usage: |
| 95 | + |
| 96 | +\`\`\`shell |
| 97 | +./get-organization-repositories.sh my-org |
| 98 | +./get-organization-repositories.sh my-org --type=private |
| 99 | +\`\`\` |
| 100 | + |
| 101 | +> [!NOTE] |
| 102 | +> Requires organization member permissions to see private repositories. |
| 103 | +``` |
| 104 | + |
| 105 | +## Instructions |
| 106 | + |
| 107 | +When I provide you with a script name and description, please: |
| 108 | + |
| 109 | +1. Determine which directory/README.md it belongs in |
| 110 | +2. Find the correct alphabetical position |
| 111 | +3. Create a properly formatted entry following the template |
| 112 | +4. Include appropriate usage examples and notes |
| 113 | +5. Ensure it will pass all lint-readme.js validations |
| 114 | + |
| 115 | +Ask for clarification if you need more details about the script's functionality or usage patterns. |
0 commit comments