mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 15:04:13 +08:00
feat: add workflow cancellation detection and update comment
When a workflow is cancelled, the comment now shows "Claude's task was cancelled" instead of the generic "Claude encountered an error" message. This provides clearer feedback to users about why the workflow stopped. Changes: - Add CLAUDE_CANCELLED environment variable using cancelled() function in action.yml - Implement cancellation detection logic in update-comment-link.ts - Update comment-logic.ts to show specific cancellation message - Add comprehensive tests for cancellation handling Fixes #123 Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>
This commit is contained in:
@@ -160,6 +160,7 @@ runs:
|
||||
IS_PR: ${{ github.event.issue.pull_request != null || github.event_name == 'pull_request_review_comment' }}
|
||||
BASE_BRANCH: ${{ steps.prepare.outputs.BASE_BRANCH }}
|
||||
CLAUDE_SUCCESS: ${{ steps.claude-code.outputs.conclusion == 'success' }}
|
||||
CLAUDE_CANCELLED: ${{ cancelled() }}
|
||||
OUTPUT_FILE: ${{ steps.claude-code.outputs.execution_file || '' }}
|
||||
TRIGGER_USERNAME: ${{ github.event.comment.user.login || github.event.issue.user.login || github.event.pull_request.user.login || github.event.sender.login || github.triggering_actor || github.actor || '' }}
|
||||
PREPARE_SUCCESS: ${{ steps.prepare.outcome == 'success' }}
|
||||
|
||||
Reference in New Issue
Block a user