From eaf73bce66945497c1ec8cc0e6f2110df53067d1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 3 Jan 2026 21:30:59 +0000 Subject: [PATCH] Address code review feedback: fix optional validations and improve grep pattern Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afcd691..af1557e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,13 +81,13 @@ jobs: set -euo pipefail echo "Scanning for suspicious variable assignments (slash in LHS)..." # Find lines that look like an assignment and contain a slash before '=' (ignore comments) - # Limit to repository and scripts directories to reduce false positives. - matches="$(grep -R --line-number -E '^[[:space:]]*[^#[:space:]][^=]*\/[^=]*=' . || true)" + # Limit search to relevant directories to reduce false positives. + matches="$(grep -R --line-number --exclude-dir=.git --exclude-dir=node_modules --exclude-dir=vendor -E '^[[:space:]]*[^#[:space:]][^=]*\/[^=]*=' . || true)" if [ -n "${matches:-}" ]; then echo "ERROR: Suspicious assignments detected (slash in LHS). Review and fix these lines:" echo "${matches}" echo "" - echo "Example of a problematic line: PREfix/TOP=\"${BRANCH_PREFIX%%/*}\"" + echo 'Example of a problematic line: PREfix/TOP="${BRANCH_PREFIX%%/*}"' exit 1 fi echo "No suspicious variable assignments found." @@ -124,7 +124,7 @@ jobs: - name: Optional validations run: | - set -euo pipefail || true + set +e optional_scripts=( "scripts/validate/changelog.sh"