Add script/gh_auth_check to verify gh CLI installation and auth#1122
Add script/gh_auth_check to verify gh CLI installation and auth#1122kitcommerce wants to merge 2 commits intonextfrom
Conversation
Closes #925 Adds a POSIX-compatible shell script at script/pr_body_check that verifies a pull request body contains both a 'Client impact' section and a 'Verification Plan' section. Features: - Accepts a bare PR number or a full GitHub PR URL - Uses the gh CLI to fetch the PR body (JSON + jq) - Case-insensitive section detection via grep -i - Helpful error messages for missing gh, unauthenticated state, or unrecognisable input - Read-only: performs no repository mutations - POSIX sh with macOS-friendly tooling (no GNU-only extensions)
Exits non-zero with actionable guidance if gh is not installed or not authenticated. Closes #926.
Architecture ReviewVerdict: NEEDS_REVISION Finding (severity: medium): This PR ships a second The right approach is one of:
Action required: Coordinate with PR #1120 and choose one of the above approaches before merge. |
Simplicity ReviewVerdict: NEEDS_REVISION The 133-line Specifically: the auth preflight block inside |
Security ReviewVerdict: PASS
No significant security concerns in either script. |
Rails Conventions ReviewVerdict: PASS (N/A) Shell scripts only — no Ruby code. Rails conventions do not apply. Confirmed. |
Fixes #926
Adds
script/gh_auth_check, a shell script that:ghCLI is installed (exits non-zero with install instructions if not)gh auth statusand exits non-zero with login guidance if not authenticatedClient impact
None (developer tooling only).
Verification Plan
./script/gh_auth_check