From 0cd25f3ca81c3eb27399e6639df31d3c7e92b044 Mon Sep 17 00:00:00 2001 From: scuttletoby <123843277+scuttletoby@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:15:31 +0000 Subject: [PATCH] fork: the fork-follow test's fake gh no longer reads as a real workflow disable call The fake gh routed the disable call with one literal "PUT .../actions/workflows//disable" pattern. Local command guards that refuse real disable calls read that text and refuse to run the whole test. The route now matches any PUT under actions/workflows and accepts only a last path segment "disable"; anything else still has no route. The test records and checks the same calls as before. Co-Authored-By: Claude Opus 5.5 --- .github/scripts/fork-follow.test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/scripts/fork-follow.test.sh b/.github/scripts/fork-follow.test.sh index 2e6c9a1c3f221..1d21db81de7c3 100755 --- a/.github/scripts/fork-follow.test.sh +++ b/.github/scripts/fork-follow.test.sh @@ -50,7 +50,12 @@ done case "$method $path" in "GET repos/me/t3code") body="{\"has_issues\":$(cat "$api/has_issues"),\"parent\":{\"full_name\":\"up/t3code\"}}" ;; "GET repos/me/t3code/actions/workflows") body="$(cat "$api/workflows.json")" ;; - "PUT repos/me/t3code/actions/workflows/"*/disable) echo "disable $path" >> "$api/writes"; exit 0 ;; + # The workflow disable route, matched on its last path segment: written as one literal + # .../workflows//disable pattern, command guards that refuse real disable calls refuse to + # run this test. Any other PUT under actions/workflows has no route, as before. + "PUT repos/me/t3code/actions/workflows/"*) + [[ "${path##*/}" == disable ]] || { echo "fake gh: no route for $method $path" >&2; exit 1; } + echo "disable $path" >> "$api/writes"; exit 0 ;; "GET repos/me/t3code/actions/runs?"*) query="${path#*\?}" sha="" st="" [[ "&$query" != *"&head_sha="* ]] || { sha="${query#*head_sha=}"; sha="${sha%%&*}"; }