Files
pnpm/.git-wt/pr-hook
T
Zoltan Kochan 8e17c3d366 refactor: rename the pacquet/ directory to pnpm/ (#12913)
Pure directory move plus path fixups: the Rust port ships as pnpm v12,
so the source tree now lives at pnpm/ (alongside pnpm11/, the frozen
TypeScript line). No identifiers change in this pass — crate names
(pacquet-*), the pacquet bin, PACQUET_VERSION, the @pacquet/* npm
package names v11's runPacquet spawns, the .pacquet virtual-store dir,
the benchmark harness's clone dir, and the pacquet-*.yml workflow
filenames (npm trusted publishing is bound to them) all stay for a
follow-up.

Also removes the root /pnpm/ .gitignore entry (build detritus in the
pre-pnpm11 package location): pnpm/ is real source now and must not be
ignored. Developers with a stale generated pnpm/ dir should delete it
before checking out this change.
2026-07-10 18:06:56 +02:00

39 lines
1.9 KiB
Bash
Executable File

#!/bin/sh
# Invoked by @zkochan/git-wt after `git wt <pr-number>` creates a worktree.
# Silently no-ops for contributors who don't have the requested agent installed.
case "${1:-}" in
'')
AGENT_CLI=claude
;;
*[!0-9]*)
AGENT_CLI=$1
;;
*)
AGENT_CLI=${2:-claude}
;;
esac
command -v "$AGENT_CLI" >/dev/null 2>&1 || exit 0
PROMPT="Review and fix PR #$PR_NUMBER. Steps:
1. Use gh to read the PR description, diff, and all review comments (both PR-level and inline).
2. Understand the intent of the PR and what each change does.
3. Resolve any conflicts with the base branch by running './shell/resolve-pr-conflicts.sh $PR_NUMBER'. This force-fetches the base branch (avoiding stale refs), rebases, and auto-resolves lockfile conflicts. If it prints MANUAL_RESOLUTION_NEEDED, read the listed conflicted files, resolve the conflict markers, run 'git add' on each resolved file, then run './shell/resolve-pr-conflicts.sh $PR_NUMBER --continue' to finish the rebase and push. Do NOT skip this step. Do NOT assume the branch is up to date.
4. Address every review comment — fix the code as requested or as appropriate.
5. Review the changed code with the framework in REVIEW_GUIDE.md (security first, performance second, then correctness) and the documented code conventions for the relevant stack — AGENTS.md and CONTRIBUTING.md for the TypeScript CLI, pnpm/AGENTS.md and pnpm/CODE_STYLE_GUIDE.md or pnpr/AGENTS.md for the Rust stacks. Fix any issues you find in the changed code.
6. Run the relevant tests to verify your fixes work.
7. Give me a summary of what you found and what you changed, including any conflicts you resolved.
Do NOT push. Leave all non-merge changes unstaged for me to review."
case "$AGENT_CLI" in
claude)
exec "$AGENT_CLI" --dangerously-skip-permissions "$PROMPT"
;;
codex)
exec "$AGENT_CLI" --dangerously-bypass-approvals-and-sandbox "$PROMPT"
;;
*)
exec "$AGENT_CLI" "$PROMPT"
;;
esac