Commit 230ab10743fe
Changed files (3)
dots
.config
gh-news
lazypr
pkgs
my
scripts
bin
dots/.config/gh-news/config.toml
@@ -53,13 +53,3 @@ interactive = false
name = "Review with Pi (yolo)"
command = "gh-news-review -d -y -t pi {url}"
interactive = false
-
-[[actions]]
-name = "Review with Copilot"
-command = "gh-news-review -d -t copilot {url}"
-interactive = false
-
-[[actions]]
-name = "Review with OpenCode"
-command = "gh-news-review -d -t opencode {url}"
-interactive = false
dots/.config/lazypr/config.toml
@@ -36,13 +36,3 @@ interactive = false
name = "Review with Pi (yolo)"
command = "gh-news-review -d -y -t pi {url}"
interactive = false
-
-[[actions]]
-name = "Review with Copilot"
-command = "gh-news-review -d -t copilot {url}"
-interactive = false
-
-[[actions]]
-name = "Review with OpenCode"
-command = "gh-news-review -d -t opencode {url}"
-interactive = false
pkgs/my/scripts/bin/gh-news-review
@@ -3,7 +3,7 @@
# Usage: gh-news-review [-d|--detach] [-y|--yolo] [-t|--tool TOOL] <url>
# -d, --detach Start session in background and return immediately
# -y, --yolo Skip permission prompts (auto-accept all tool calls)
-# -t, --tool TOOL AI tool to use: claude, copilot, pi, opencode (default: claude)
+# -t, --tool TOOL AI tool to use: claude, pi (default: claude)
set -euo pipefail
@@ -44,17 +44,17 @@ fi
# Validate tool
case "$TOOL" in
-claude | copilot | pi | opencode) ;;
+claude | pi) ;;
*)
- echo "Error: Invalid tool '$TOOL'. Must be one of: claude, copilot, pi, opencode" >&2
+ echo "Error: Invalid tool '$TOOL'. Must be one of: claude, pi" >&2
exit 1
;;
esac
# Extract session name from URL (e.g., pull-123 or issues-456)
-SESSION_NAME="review-$(echo "$URL" | grep -oE '(pull|issues)/[0-9]+' | tr '/' '-')"
+SESSION_NAME="${TOOL}-review-$(echo "$URL" | grep -oE '(pull|issues)/[0-9]+' | tr '/' '-')"
-if [[ -z "$SESSION_NAME" || "$SESSION_NAME" == "review-" ]]; then
+if [[ -z "$SESSION_NAME" || "$SESSION_NAME" == "${TOOL}-review-" ]]; then
echo "Error: Could not extract PR/issue number from URL: $URL" >&2
exit 1
fi
@@ -90,16 +90,6 @@ For nixpkgs PRs:
At the end, save the session (in ~/.config/claude/history/sessions/) with the command /save-session"
;;
- 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
-
-At the end, save the session (in ~/.config/claude/history/sessions/)"
- ;;
esac
else
case "$TOOL" in
@@ -109,9 +99,6 @@ else
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
@@ -123,20 +110,12 @@ claude)
AI_CMD="cr --dangerously-skip-permissions"
fi
;;
-copilot)
- AI_CMD="copilot -p"
- # 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 run"
- # Note: opencode doesn't have a yolo/skip-permissions mode
- ;;
esac
# Encode prompt in base64 to avoid all quoting issues