Commit 9a4383d74a06
Changed files (1)
pkgs
my
scripts
bin
pkgs/my/scripts/bin/gh-news-review
@@ -44,12 +44,11 @@ fi
# Validate tool
case "$TOOL" in
- claude|copilot|pi|opencode)
- ;;
- *)
- echo "Error: Invalid tool '$TOOL'. Must be one of: claude, copilot, pi, opencode" >&2
- exit 1
- ;;
+claude | copilot | pi | opencode) ;;
+*)
+ echo "Error: Invalid tool '$TOOL'. Must be one of: claude, copilot, pi, opencode" >&2
+ exit 1
+ ;;
esac
# Extract session name from URL (e.g., pull-123 or issues-456)
@@ -69,8 +68,8 @@ fi
# Build the prompt based on the type of review
if [[ "$IS_NIXPKGS" == "true" ]]; then
case "$TOOL" in
- claude)
- PROMPT="Review $URL using the Nixpkgs skill (~/.config/claude/skills), and the Review workflow. Use GPT-5.2-Codex or Opus 4.5 model if available.
+ claude)
+ PROMPT="Review $URL using the Nixpkgs skill (~/.config/claude/skills), and the Review workflow. Use GPT-5.2-Codex or Opus 4.5 model if available.
For nixpkgs PRs:
1. Load and follow the Nixpkgs skill workflow
@@ -79,9 +78,9 @@ For nixpkgs PRs:
4. If I'm a maintainer of the touched packages, use the auto-merge-pr script to build, approve, and trigger merge-bot
At the end, save the session (in ~/.config/claude/history/sessions/)"
- ;;
- pi)
- PROMPT="Review $URL using the Nixpkgs skill (~/.pi/skills), and the Review workflow. Use GPT-5.2-Codex or Opus 4.5 model if available.
+ ;;
+ pi)
+ PROMPT="Review $URL using the Nixpkgs skill (~/.config/claude/skills), and the Review workflow. Use GPT-5.2-Codex or Opus 4.5 model if available.
For nixpkgs PRs:
1. Load and follow the Nixpkgs skill workflow
@@ -90,52 +89,52 @@ For nixpkgs PRs:
4. If I'm a maintainer of the touched packages, use the auto-merge-pr script to build, approve, and trigger merge-bot
At the end, save the session"
- ;;
- copilot|opencode)
- PROMPT="Review $URL
+ ;;
+ copilot | opencode)
+ PROMPT="Review $URL
For nixpkgs PRs:
1. Use nixpkgs-review to build and test the changes when appropriate
2. When approving, use a concise message (e.g., 'LGTM, tested with nixpkgs-review')
3. If I'm a maintainer of the touched packages, use the auto-merge-pr script to build, approve, and trigger merge-bot"
- ;;
+ ;;
esac
else
case "$TOOL" in
- claude)
- PROMPT="Review $URL, and load the proper skill as needed (e.g. nixpkgs skills and workflows if it is a pr from NixOS/nixpkgs)"
- ;;
- pi)
- PROMPT="Review $URL, and load the proper skill as needed (e.g. nixpkgs skills and workflows if it is a pr from NixOS/nixpkgs)"
- ;;
- copilot|opencode)
- PROMPT="Review $URL"
- ;;
+ claude)
+ PROMPT="Review $URL, and load the proper skill as needed (e.g. nixpkgs skills and workflows if it is a pr from NixOS/nixpkgs)"
+ ;;
+ pi)
+ PROMPT="Review $URL, and load the proper skill as needed (e.g. nixpkgs skills and workflows if it is a pr from NixOS/nixpkgs)"
+ ;;
+ copilot | opencode)
+ PROMPT="Review $URL"
+ ;;
esac
fi
# Build command based on tool and optional yolo mode
case "$TOOL" in
- claude)
- AI_CMD="cr"
- if [[ "$YOLO" == "true" ]]; then
- AI_CMD="cr --dangerously-skip-permissions"
- fi
- ;;
- copilot)
- AI_CMD="copilot"
- # Note: copilot doesn't have a yolo/skip-permissions mode
- ;;
- pi)
- AI_CMD="pi"
- if [[ "$YOLO" == "true" ]]; then
- AI_CMD="pi --dangerously-skip-permissions"
- fi
- ;;
- opencode)
- AI_CMD="opencode"
- # Note: opencode doesn't have a yolo/skip-permissions mode
- ;;
+claude)
+ AI_CMD="cr"
+ if [[ "$YOLO" == "true" ]]; then
+ AI_CMD="cr --dangerously-skip-permissions"
+ fi
+ ;;
+copilot)
+ AI_CMD="copilot"
+ # Note: copilot doesn't have a yolo/skip-permissions mode
+ ;;
+pi)
+ AI_CMD="pi"
+ if [[ "$YOLO" == "true" ]]; then
+ AI_CMD="pi --dangerously-skip-permissions"
+ fi
+ ;;
+opencode)
+ AI_CMD="opencode"
+ # Note: opencode doesn't have a yolo/skip-permissions mode
+ ;;
esac
# Encode prompt in base64 to avoid all quoting issues