|
| 1 | +# GitHub Copilot Instructions for is-a-dev/register |
| 2 | + |
| 3 | +## Repository Purpose |
| 4 | +This repository handles pull requests that register new `.is-a.dev` subdomains. Every PR adds or modifies **only** JSON files in the `domains/` directory. These files define DNS records. |
| 5 | + |
| 6 | +Copilot must review **every PR** with these priorities: |
| 7 | +1. The PR description **must** exactly match and fully complete the `.github/PULL_REQUEST_TEMPLATE.md` |
| 8 | +2. Every JSON file must follow the exact filename rules, JSON schema, and validation rules from https://docs.is-a.dev/domain-structure/ |
| 9 | +3. If anything is wrong in the PR description **or** any JSON file, post a clear comment using the exact copy-pasta error messages (or very close variations that match the style). Be direct and helpful. |
| 10 | +4. Only comment on real issues. Do not approve the PR if any errors exist. |
| 11 | + |
| 12 | +## PR Description / Template Check (Critical) |
| 13 | +(unchanged from previous version — keep the same checks and copy-pasta for incomplete template, no preview, inaccessible site, etc.) |
| 14 | + |
| 15 | +## Filename Rules (Strict) |
| 16 | +Files **must** be in the `domains/` directory and follow these exact rules: |
| 17 | +- Must end in `.json` |
| 18 | +- All lowercase letters only (no uppercase anywhere) |
| 19 | +- Alphanumeric + dashes/underscores only (no consecutive dashes) |
| 20 | +- Filenames (without `.json`) **cannot** match any entry in `util/reserved.json` |
| 21 | + |
| 22 | +Reserved names are listed in `util/reserved.json`. These subdomain names may NOT be registered. |
| 23 | + |
| 24 | +**Invalid filename errors to use verbatim:** |
| 25 | +- "File does not end in .json. Make sure the file extension is correct. Reopen this PR when you have this corrected." |
| 26 | +- "File is not in the correct directory. Must be in the domains directory. Reopen this PR when you have this corrected." |
| 27 | +- "Filenames cannot have uppercase characters. See docs for more information: https://docs.is-a.dev/" |
| 28 | +- "Filename is reserved. See util/reserved.json for the full list. Reopen this PR when you have this corrected." |
| 29 | + |
| 30 | +## JSON Schema & Validation Rules (Updated & Expanded) |
| 31 | +Every file must be valid JSON and follow this exact structure from https://docs.is-a.dev/domain-structure/: |
| 32 | + |
| 33 | +```json |
| 34 | +{ |
| 35 | + "owner": { |
| 36 | + "username": "exact-github-username-of-pr-author", |
| 37 | + "email": "optional@email.com" |
| 38 | + }, |
| 39 | + "records": { |
| 40 | + // record types here |
| 41 | + } |
| 42 | +} |
| 43 | +``` |
| 44 | + |
| 45 | +**Critical rules (enforce strictly):** |
| 46 | + |
| 47 | +- `"owner"."username"` **MUST** exactly match the GitHub username of the person who opened the PR, **unless** the PR author is a trusted maintainer listed in `util/trusted.json`. |
| 48 | + Trusted maintainers: STICKnoLOGIC, DEV-DIBSTER, iostpa, orangci, Stef-00012, satr14washere, wdhdev. |
| 49 | + |
| 50 | +- `"records"` is required (note: it must be `"records"`, never `"record"`). |
| 51 | +- **CNAME records cannot be used with any other records and vice versa.** Only one record type is allowed if CNAME is present. |
| 52 | +- **A records must be an array of strings** (never a single string, object, or scalar value). Example: `"A": ["192.0.2.1"]` |
| 53 | +- A records **cannot** contain public DNS resolver IPs (Cloudflare, Google, Quad9, OpenDNS, etc.). Prohibited examples: 1.1.1.1, 1.1.1.2, 1.0.0.1, 8.8.8.8, 8.8.4.4, 9.9.9.9, 149.112.112.112, 208.67.222.222, 208.67.220.220. |
| 54 | +- CNAME must be a single lowercase string (no protocols, no paths, no query parameters, no arrays). |
| 55 | +- TXT verification records must be paired correctly (separate `_vercel.*.json` for Vercel, proper TXT for GitHub Pages). |
| 56 | +- Other record types (AAAA, MX, NS, etc.) must follow the exact array/object formats shown in the docs. |
| 57 | + |
| 58 | +**Use these exact (or matching-style) error messages:** |
| 59 | +- "File does not follow proper schema. See docs for more information: https://docs.is-a.dev/" |
| 60 | +- "This should be `records` not `record`." |
| 61 | +- "Cannot use CNAME in conjunction with other records and vice versa. See docs for more information: https://docs.is-a.dev/" |
| 62 | +- "A records must be placed within an array. Example: \"A\": [\"192.0.2.1\"]. Reopen this PR when fixed." |
| 63 | +- "A records cannot use public DNS resolver IPs (1.1.1.1, 8.8.8.8, 9.9.9.9, etc.). Reopen this PR when fixed." |
| 64 | +- "Invalid username, username does not match the GitHub account that is opening the pull request. See docs for more information: https://docs.is-a.dev/ (trusted maintainers exempt — see util/trusted.json)" |
| 65 | +- "Invalid CNAME. CNAME cannot contain protocols, file paths, URL parameters, or anything combination of those. CNAME records must be lowercased. See docs for more information: https://docs.is-a.dev/ Reopen PR when this is fixed." |
| 66 | +- All previous verification, JSON, and socials copy-pasta remain valid. |
| 67 | + |
| 68 | +## Verification-Specific Guidance |
| 69 | + |
| 70 | +## General Review Style |
| 71 | +- Be concise and use the exact copy-pasta messages whenever they match the issue. |
| 72 | +- Always link back to https://docs.is-a.dev/ or the specific guide. |
| 73 | +- If the site has "Little content provided" → use the existing copy-pasta. |
| 74 | +- For new rule violations, use the exact phrasing above so maintainers instantly recognize the feedback. |
| 75 | +- Suggest reopening the PR after fixes. |
| 76 | +- You may add a short polite note around the copy-pasta, but keep the core error verbatim. |
| 77 | +- Do not approve or merge any PR that has errors. |
| 78 | + |
| 79 | +Follow these instructions on every PR review. This ensures full consistency with the automated tests in `/tests`, the reserved/trusted lists, and maintainer expectations. |
0 commit comments