From 4067615be8d5209a855a36106e332aa93527c910 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Jul 2026 19:14:18 +0100 Subject: [PATCH] fix(ci): make Prettier workflow pass on develop (#4941) * style(alerts): prettier-format alert_matrix.sh Add the space in '2> /dev/null' that prettier-plugin-sh expects. This was in the original #4901 code and tripped the Prettier workflow on develop after merge (the workflow auto-formats and then can't push to the protected branch, so the run fails). * ci(prettier): ignore package-lock.json package-lock.json is machine-generated by npm; Prettier reformatting it conflicts with npm's own output and causes the Prettier auto-commit workflow to try (and fail) to push lockfile churn to protected develop. Ignoring it lets the workflow find nothing to change and pass. --- .prettierignore | 4 ++++ lgsm/modules/alert_matrix.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.prettierignore b/.prettierignore index 7b065e422..ed5b8552f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,7 @@ # Prettier auto-commit runs with GITHUB_TOKEN (GitHub App). # GitHub blocks that token from creating/updating anything under .github/workflows. .github/workflows/** + +# Machine-generated by npm; its format is owned by npm, not Prettier. +# Prettier reformatting it fights npm and makes the auto-commit run fail. +package-lock.json diff --git a/lgsm/modules/alert_matrix.sh b/lgsm/modules/alert_matrix.sh index ab3f6e230..34d226f1f 100755 --- a/lgsm/modules/alert_matrix.sh +++ b/lgsm/modules/alert_matrix.sh @@ -60,7 +60,7 @@ matrixsend=$(curl --connect-timeout 10 -sSL -X PUT \ "${matrixurl}") exitcode=$? -matrixeventid="$(echo "${matrixsend}" | jq -r '.event_id // empty' 2>/dev/null)" +matrixeventid="$(echo "${matrixsend}" | jq -r '.event_id // empty' 2> /dev/null)" if [ "${exitcode}" -eq 0 ] && [ -n "${matrixeventid}" ]; then fn_print_ok_nl "Sending Matrix alert" fn_script_log_pass "Sending Matrix alert"