Include full contents of all nested repositories

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 16:25:02 +01:00
parent 14ff8fd54c
commit 2401ed446f
7271 changed files with 1310112 additions and 6 deletions

View File

@@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euo pipefail
if [ "$#" -ne 2 ]; then
echo "Usage: scripts/pr-prepare <init|validate-commit|gates|push|run> <PR>"
exit 2
fi
mode="$1"
pr="$2"
script_dir="$(cd "$(dirname "$0")" && pwd)"
base="$script_dir/pr"
if common_git_dir=$(git -C "$script_dir" rev-parse --path-format=absolute --git-common-dir 2>/dev/null); then
canonical_base="$(dirname "$common_git_dir")/scripts/pr"
if [ -x "$canonical_base" ]; then
base="$canonical_base"
fi
fi
case "$mode" in
init)
exec "$base" prepare-init "$pr"
;;
validate-commit)
exec "$base" prepare-validate-commit "$pr"
;;
gates)
exec "$base" prepare-gates "$pr"
;;
push)
exec "$base" prepare-push "$pr"
;;
run)
exec "$base" prepare-run "$pr"
;;
*)
echo "Usage: scripts/pr-prepare <init|validate-commit|gates|push|run> <PR>"
exit 2
;;
esac