From 3cf02b1b5e4c76a0ac85a68f89ebe4e55d5b57f4 Mon Sep 17 00:00:00 2001 From: Joseph Mearman Date: Fri, 11 Sep 2026 10:48:22 +0100 Subject: [PATCH] fix(action): define COMMENT_ID before referencing it in the progress-comment step Under set -u, the "Post progress comment" step's own closing diagnostic line read an unset COMMENT_ID: the step only ever built comment_id inline inside the GITHUB_OUTPUT echo, never assigning it to a local variable the later echo could read. This crashed the step on every run of every mode (the step's own continue-on-error kept the job green, so the crash was silent). Assign COMMENT_ID from the API response once, then reuse it for both the output and the diagnostic line. --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 32e9b45..9f49426 100644 --- a/action.yml +++ b/action.yml @@ -756,7 +756,8 @@ runs: echo "Giving up on posting a progress comment after 3 attempts." exit 1 fi - echo "comment_id=$(jq -r '.id' <<<"$COMMENT_JSON")" >> "$GITHUB_OUTPUT" + COMMENT_ID=$(jq -r '.id' <<<"$COMMENT_JSON") + echo "comment_id=${COMMENT_ID}" >> "$GITHUB_OUTPUT" # The actual identity GH_TOKEN just posted as, read straight from this real API response rather than assumed -- "Verify triage output landed" further down uses this (when it exists) as the authoritative answer to "which comments are this run's own output", since it's the one point in the job that observes the true poster identity firsthand. echo "actor_login=$(jq -r '.user.login' <<<"$COMMENT_JSON")" >> "$GITHUB_OUTPUT" # Threaded through to "Update progress comment" below as the single source of truth for the marker text, rather than a second hardcoded literal that has to be kept in sync by hand.