fix(mosaic-tools): roll up Gitea and Woodpecker wrapper fixes #524

Merged
jason.woltje merged 12 commits from fix/git-wrapper-rollup-20260526 into main 2026-05-26 20:56:10 +00:00
Showing only changes of commit 9547dc8b97 - Show all commits

View File

@@ -39,6 +39,7 @@ printf '\n' >> "$PR_MERGE_TEST_LOG"
args=" $* " args=" $* "
out_file="" out_file=""
write_code=false write_code=false
post_data=""
prev="" prev=""
for arg in "$@"; do for arg in "$@"; do
if [[ "$prev" == "-o" ]]; then if [[ "$prev" == "-o" ]]; then
@@ -46,10 +47,19 @@ for arg in "$@"; do
prev="" prev=""
continue continue
fi fi
if [[ "$prev" == "-d" ]]; then
post_data="$arg"
prev=""
continue
fi
if [[ "$arg" == "-o" ]]; then if [[ "$arg" == "-o" ]]; then
prev="-o" prev="-o"
continue continue
fi fi
if [[ "$arg" == "-d" ]]; then
prev="-d"
continue
fi
if [[ "$arg" == "-w" ]]; then if [[ "$arg" == "-w" ]]; then
write_code=true write_code=true
fi fi
@@ -70,6 +80,10 @@ if [[ "$args" == *"/api/v1/repos/mosaicstack/stack/pulls/123"* && "$args" != *"/
exit 0 exit 0
fi fi
if [[ "$args" == *"-X POST"* && "$args" == *"/api/v1/repos/mosaicstack/stack/pulls/123/merge"* ]]; then if [[ "$args" == *"-X POST"* && "$args" == *"/api/v1/repos/mosaicstack/stack/pulls/123/merge"* ]]; then
if [[ "$post_data" != '{"Do":"squash"}' ]]; then
echo "unexpected merge payload: $post_data" >&2
exit 96
fi
emit_response '{"merged":true,"message":"mock merge complete"}' emit_response '{"merged":true,"message":"mock merge complete"}'
exit 0 exit 0
fi fi