From 5beca8df57959e4d6f827ff97a42e81b81d05759 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 22 May 2026 12:17:03 +0200 Subject: [PATCH] YETUS-1278. Restore commit statuses under GHA with stable context keys YETUS-1277 removed all per-sub-check commit statuses under GitHub Actions to avoid stale statuses on re-run (severity was encoded in the context key, so re-runs created new entries instead of overwriting). This left push-event consumers with no per-check visibility in the GitHub UI. Replace the blanket skip with two targeted fixes: - Use GITHUB_JOB in the header so concurrent workflows don't collide - Drop severity prefix from context keys so re-runs overwrite correctly --- precommit/src/main/shell/plugins.d/github.sh | 15 +++++---------- .../src/main/shell/robots.d/githubactions.sh | 1 + 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/precommit/src/main/shell/plugins.d/github.sh b/precommit/src/main/shell/plugins.d/github.sh index cef6bab18..3acd1f521 100755 --- a/precommit/src/main/shell/plugins.d/github.sh +++ b/precommit/src/main/shell/plugins.d/github.sh @@ -1223,14 +1223,9 @@ function github_finalreport github_end_checkrun "${result}" - # Under GHA the per-sub-check detail is already in the PR comment and the - # step summary. Commit statuses encode severity in the context key, so a - # re-run that changes outcome never overwrites the old status (YETUS-1277). - if [[ "${ROBOTTYPE}" == 'githubactions' ]]; then - return 0 - fi - - if [[ "${ROBOTTYPE}" ]]; then + if [[ "${ROBOTTYPE}" == 'githubactions' && -n "${GITHUB_JOB}" ]]; then + header="Apache Yetus(${GITHUB_JOB})" + elif [[ "${ROBOTTYPE}" ]]; then header="Apache Yetus(${ROBOTTYPE})" else header="Apache Yetus" @@ -1332,7 +1327,7 @@ function github_finalreport echo "{\"state\": \"${status}\", " echo "\"target_url\": \"${logurl}\"," echo "\"description\": \"${comment}\"," - echo "\"context\":\"${header} warning: ${subs}\"}" + echo "\"context\":\"${header}: ${subs}\"}" } > "${tempfile}" github_status_write "${tempfile}" rm "${tempfile}" @@ -1341,7 +1336,7 @@ function github_finalreport echo "{\"state\": \"${status}\", " echo "\"target_url\": \"${logurl}\"," echo "\"description\": \"${comment}\"," - echo "\"context\":\"${header} error: ${subs}\"}" + echo "\"context\":\"${header}: ${subs}\"}" } > "${tempfile}" github_status_write "${tempfile}" rm "${tempfile}" diff --git a/precommit/src/main/shell/robots.d/githubactions.sh b/precommit/src/main/shell/robots.d/githubactions.sh index d614e07b3..803cb1dac 100755 --- a/precommit/src/main/shell/robots.d/githubactions.sh +++ b/precommit/src/main/shell/robots.d/githubactions.sh @@ -69,6 +69,7 @@ if [[ "${GITHUB_ACTIONS}" == true ]] && GITHUB_ACTIONS \ GITHUB_BASE_REF \ GITHUB_EVENT_NAME \ + GITHUB_JOB \ GITHUB_REF \ GITHUB_REPOSITORY \ GITHUB_RUN_NUMBER \