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