-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Feature Request: Add option to disable Claude Code Report in GitHub Step Summary
Problem Description
Currently, the Claude Code Action automatically adds a "Claude Code Report" section to the GitHub Step Summary that displays the entire JSON execution output. This happens in the "Display Claude Code Report" step (lines 183-191 in action.yml):
- name: Display Claude Code Report
if: steps.prepare.outputs.contains_trigger == 'true' && steps.claude-code.outputs.execution_file != ''
shell: bash
run: |
echo "## Claude Code Report" >> $GITHUB_STEP_SUMMARY
echo '```json' >> $GITHUB_STEP_SUMMARY
cat "${{ steps.claude-code.outputs.execution_file }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARYWhile this is useful for debugging, it can conflict with custom formatting solutions that process the execution output.
Use Case
I've created a Claude Output Formatter GitHub Action that takes the Claude execution JSON and formats it into a more readable markdown format with:
- Structured conversation flow
- Token usage summaries
- Execution statistics
- Collapsible sections for long content
- Customizable output options
However, when using both actions together, the GitHub Step Summary shows:
- The raw JSON from Claude Code Action's "Claude Code Report"
- The nicely formatted output from my formatter
This creates duplicate information and makes the step summary unnecessarily long.
Proposed Solution
Add an optional input parameter to control whether the Claude Code Report is displayed:
inputs:
display_report:
description: "Whether to display the Claude Code Report in GitHub Step Summary"
required: false
default: "true"Then modify the Display Claude Code Report step to check this input:
- name: Display Claude Code Report
if: steps.prepare.outputs.contains_trigger == 'true' && steps.claude-code.outputs.execution_file != '' && inputs.display_report != 'false'
shell: bash
run: |
echo "## Claude Code Report" >> $GITHUB_STEP_SUMMARY
echo '```json' >> $GITHUB_STEP_SUMMARY
cat "${{ steps.claude-code.outputs.execution_file }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARYBenefits
- Backward compatibility: Default behavior remains unchanged
- Flexibility: Users can opt out when using custom formatting
- Cleaner output: Avoids duplicate information in step summaries
- Better integration: Enables third-party tools to provide enhanced formatting
Example Usage
Users could then disable the default report when using custom formatting:
- name: Claude Code Action
uses: anthropics/claude-code-action@main
with:
trigger_phrase: "@claude"
display_report: false # Disable default report
id: claude
- name: Format Claude Output
uses: atlasfutures/claude-output-formatter@main
with:
execution_file: ${{ steps.claude.outputs.execution_file }}
format_type: markdownAlternative Solutions Considered
- Clearing the step summary after Claude Code Action runs - This works but feels hacky and might clear other important information
- Forking the action - Creates maintenance burden and divergence from official action
Additional Context
The raw JSON in the Claude Code Report can be quite large (often hundreds of lines), making it difficult to find the actual formatted results below it when using custom formatting solutions.
Would you be open to accepting a PR for this feature? I'd be happy to implement it if you agree with the approach.