From c8e006c1a5f785abdeaeea4d919a66bed7e857be Mon Sep 17 00:00:00 2001 From: Patrick Lewis <4015312+locus313@users.noreply.github.com> Date: Sun, 21 Jun 2026 12:58:47 -0700 Subject: [PATCH 1/2] feat: make repo AI-ready MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add AGENTS.md — project overview, directory map, build/run, conventions, adding-a-new-script guide - Add CHANGELOG.md — full history from initial commit (2021) through today - Add .mcp.json — GitHub MCP server config for Copilot CLI - Add .github/workflows/ci.yml — shellcheck on all .sh files for every PR - Add .github/workflows/copilot-setup-steps.yml — pre-installs jq, shellcheck, gitleaks for cloud agent - Add .github/ISSUE_TEMPLATE/bug_report.yml + feature_request.yml - Add .github/PULL_REQUEST_TEMPLATE.md — checklist derived from script conventions - Add .github/dependabot.yml — monthly GitHub Actions version updates - Update .github/copilot-instructions.md — append maintenance matrix - Update README.md — add Contributing section and AI-Ready badge Before: 2/12 assets (Getting Started) After: 12/12 assets (AI-Ready) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.yml | 77 ++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 47 +++++ .github/PULL_REQUEST_TEMPLATE.md | 34 ++++ .github/copilot-instructions.md | 75 ++++++++ .github/dependabot.yml | 8 + .github/workflows/ci.yml | 35 ++++ .github/workflows/copilot-setup-steps.yml | 29 +++ .mcp.json | 9 + AGENTS.md | 207 +++++++++++++++++++++ CHANGELOG.md | 131 +++++++++++++ README.md | 31 ++- 11 files changed, 681 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/copilot-setup-steps.yml create mode 100644 .mcp.json create mode 100644 AGENTS.md create mode 100644 CHANGELOG.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..68ee537 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,77 @@ +name: Bug Report +description: Report a broken or incorrect script behaviour +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report a bug. Please fill in as much detail as possible so it can be reproduced and fixed quickly. + + - type: textarea + id: description + attributes: + label: What happened? + description: A clear description of the incorrect behaviour. + validations: + required: true + + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: Exact commands and environment variable exports used (redact the token value). + placeholder: | + export GITHUB_TOKEN=ghp_REDACTED + export ORG=my-org + ./org-admin/github-get-repo-list/github-get-repo-list.sh + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected behaviour + description: What should the script have done? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual output + description: Paste the full terminal output (redact any sensitive values). + render: shell + validations: + required: true + + - type: input + id: script + attributes: + label: Affected script + description: Which script is affected? + placeholder: org-admin/github-get-repo-list/github-get-repo-list.sh + validations: + required: true + + - type: dropdown + id: target + attributes: + label: GitHub target + options: + - github.com + - GitHub Enterprise Server (GHES) + - GitHub Enterprise Cloud (GHEC) + validations: + required: true + + - type: textarea + id: environment + attributes: + label: Environment + description: OS, bash version, jq version + placeholder: | + OS: macOS 14 / Ubuntu 22.04 + bash: 5.2 + jq: 1.7 + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..c57b28f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,47 @@ +name: Feature Request +description: Suggest a new script or an improvement to an existing one +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Got an idea for a new script or a useful improvement? Describe it below. + + - type: textarea + id: problem + attributes: + label: What problem does this solve? + description: Describe the GitHub admin task you're trying to automate. + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed solution + description: Describe the script or change you'd like to see, including what env vars it would accept and what it would output. + validations: + required: true + + - type: dropdown + id: domain + attributes: + label: Script domain + description: Which folder would this belong in? + options: + - org-admin + - enterprise + - reporting + - personal + - lib (shared utility) + - not sure + validations: + required: false + + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Any other approaches or existing tools you evaluated? + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..402ace5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,34 @@ +## Description + + + +## Changes + + + +- [ ] New script: `/github-/github-.sh` +- [ ] Modified: `lib/github-common.sh` +- [ ] Other: + +## How to test + +```bash +export GITHUB_TOKEN=ghp_REDACTED +export ORG=test-org +./path/to/script.sh [--dry-run] +``` + + + +## Checklist + +- [ ] `set -euo pipefail` is the first executable line after the `# ===` header +- [ ] Script sources `lib/github-common.sh` via `SCRIPT_DIR` +- [ ] All required env vars validated with `require_env_var` +- [ ] Token validated with `validate_github_token` (or `validate_token` for secondary tokens) +- [ ] User-supplied slugs validated with `validate_slug` +- [ ] `sleep` added between repo-level operations to respect rate limits +- [ ] README.md updated with the new/changed script (env var table + usage example) +- [ ] Script header comment matches README documentation +- [ ] Tested on a non-production org before production +- [ ] shellcheck passes (`shellcheck --severity=warning --exclude=SC2034,SC1091 --shell=bash