We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06a811d commit f535774Copy full SHA for f535774
1 file changed
scripts/pr2wt.sh
@@ -68,11 +68,19 @@ dir=$(basename $(pwd))
68
git branch -D pr/$PR 2> /dev/null
69
git worktree add -b pr/$PR ../$dir-pr-$PR pr/$PR/$head_ref 2> /dev/null
70
71
+og_path=$(pwd)
72
wt_path=$(cd ../$dir-pr-$PR && pwd)
73
74
echo "git worktree created in $wt_path"
75
76
cd $wt_path
77
+
78
+# pi agent setup in the worktree
79
+if [[ -f "$og_path/.pi/SYSTEM.md" && ! -f ".pi/SYSTEM.md" ]]; then
80
+ mkdir -p .pi
81
+ ln -sfn "$og_path/.pi/SYSTEM.md" .pi/SYSTEM.md
82
+fi
83
84
git branch --set-upstream-to=pr/$PR/$head_ref
85
git pull --ff-only || {
86
echo "error: failed to pull pr/$PR"
0 commit comments