From 360b262c470793e62f56fbaeed6282a1bb98d77d Mon Sep 17 00:00:00 2001 From: Andriujose <43181885+andriujoseba@users.noreply.github.com> Date: Mon, 3 Aug 2026 21:00:40 +0000 Subject: [PATCH] fix: satisfy refs guard shellcheck --- actions/refs-not-closing/run.sh | 2 ++ test/refs-not-closing.test.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actions/refs-not-closing/run.sh b/actions/refs-not-closing/run.sh index d281ce6..6a0dd4a 100755 --- a/actions/refs-not-closing/run.sh +++ b/actions/refs-not-closing/run.sh @@ -12,6 +12,8 @@ name="${GITHUB_REPOSITORY#*/}" exit 1 } +# GraphQL variables are literal API syntax; the shell must not expand them. +# shellcheck disable=SC2016 facts="$(gh api graphql \ -f query='query($owner: String!, $name: String!, $number: Int!) { repository(owner: $owner, name: $name) { diff --git a/test/refs-not-closing.test.sh b/test/refs-not-closing.test.sh index 60db210..b81a2dd 100755 --- a/test/refs-not-closing.test.sh +++ b/test/refs-not-closing.test.sh @@ -143,7 +143,7 @@ one_graphql_read() { check "action performs exactly one GraphQL read" 0 "1" \ one_graphql_read check "composite delegates to the tested entrypoint" 0 "run.sh" \ - grep -F 'run: bash "$GITHUB_ACTION_PATH/run.sh"' "$ACTION" + grep -F "run: bash \"\$GITHUB_ACTION_PATH/run.sh\"" "$ACTION" check "workflow wakes on body edits" 0 "types: [opened, edited, reopened, synchronize]" \ grep -F "types: [opened, edited, reopened, synchronize]" "$WORKFLOW"