pr2wt : symlink .pi (#22386)

This commit is contained in:
Georgi Gerganov
2026-04-26 19:49:26 +03:00
committed by GitHub
parent 06a811d085
commit f535774325
+8
View File
@@ -68,11 +68,19 @@ dir=$(basename $(pwd))
git branch -D pr/$PR 2> /dev/null git branch -D pr/$PR 2> /dev/null
git worktree add -b pr/$PR ../$dir-pr-$PR pr/$PR/$head_ref 2> /dev/null git worktree add -b pr/$PR ../$dir-pr-$PR pr/$PR/$head_ref 2> /dev/null
og_path=$(pwd)
wt_path=$(cd ../$dir-pr-$PR && pwd) wt_path=$(cd ../$dir-pr-$PR && pwd)
echo "git worktree created in $wt_path" echo "git worktree created in $wt_path"
cd $wt_path cd $wt_path
# pi agent setup in the worktree
if [[ -f "$og_path/.pi/SYSTEM.md" && ! -f ".pi/SYSTEM.md" ]]; then
mkdir -p .pi
ln -sfn "$og_path/.pi/SYSTEM.md" .pi/SYSTEM.md
fi
git branch --set-upstream-to=pr/$PR/$head_ref git branch --set-upstream-to=pr/$PR/$head_ref
git pull --ff-only || { git pull --ff-only || {
echo "error: failed to pull pr/$PR" echo "error: failed to pull pr/$PR"