From 85133eeab220b669a1327e80483cdd0cd5e6f443 Mon Sep 17 00:00:00 2001 From: Dave London <126142871+Dave-London@users.noreply.github.com> Date: Sun, 5 Apr 2026 06:09:21 +0300 Subject: [PATCH] fix: skip token revocation when no token was acquired (#918) Add a check for non-empty github_token output before attempting to revoke the app token in the cleanup step. When the prepare phase fails (e.g., unsupported event type with track_progress), no token is acquired, causing the cleanup curl to send an empty Bearer token and produce a confusing "Bad credentials" 401 error. Fixes #858 Co-authored-by: Dave-London Co-authored-by: Claude Opus 4.6 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 46a83fb..244f8fb 100644 --- a/action.yml +++ b/action.yml @@ -335,7 +335,7 @@ runs: bun run ${GITHUB_ACTION_PATH}/src/entrypoints/post-buffered-inline-comments.ts - name: Revoke app token - if: always() && inputs.github_token == '' && steps.run.outputs.skipped_due_to_workflow_validation_mismatch != 'true' + if: always() && inputs.github_token == '' && steps.run.outputs.github_token != '' && steps.run.outputs.skipped_due_to_workflow_validation_mismatch != 'true' shell: bash run: | curl -L \