test(ci): cover next-lane PR merges
This commit is contained in:
@@ -17,9 +17,10 @@ make_fixture() {
|
|||||||
cp "$SCRIPT_DIR/detect-platform.sh" "$tools/detect-platform.sh"
|
cp "$SCRIPT_DIR/detect-platform.sh" "$tools/detect-platform.sh"
|
||||||
git -C "$root/repo" init -q
|
git -C "$root/repo" init -q
|
||||||
git -C "$root/repo" remote add origin "$remote"
|
git -C "$root/repo" remote add origin "$remote"
|
||||||
|
local base_branch="${3:-main}"
|
||||||
cat > "$tools/pr-metadata.sh" <<SH
|
cat > "$tools/pr-metadata.sh" <<SH
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
printf '%s\n' '{"baseRefName":"main","headRefName":"fix/pinned","headRefOid":"$SHA","headRepository":"contributor/widgets-fork"}'
|
printf '%s\n' '{"baseRefName":"$base_branch","headRefName":"fix/pinned","headRefOid":"$SHA","headRepository":"contributor/widgets-fork"}'
|
||||||
SH
|
SH
|
||||||
cat > "$tools/ci-queue-wait.sh" <<'SH'
|
cat > "$tools/ci-queue-wait.sh" <<'SH'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
@@ -29,8 +30,8 @@ SH
|
|||||||
}
|
}
|
||||||
|
|
||||||
rm -rf "$WORK_DIR"
|
rm -rf "$WORK_DIR"
|
||||||
make_fixture gitea https://git.example.test/acme/widgets.git
|
make_fixture gitea https://git.example.test/acme/widgets.git next
|
||||||
make_fixture github https://github.com/acme/widgets.git
|
make_fixture github https://github.com/acme/widgets.git main
|
||||||
|
|
||||||
cat > "$WORK_DIR/gitea/curl" <<'SH'
|
cat > "$WORK_DIR/gitea/curl" <<'SH'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|||||||
Reference in New Issue
Block a user