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%%&*}"; }