Skip to content

Commit cc5ef44

Browse files
feat: add display_report option to disable step summary (#952)
Add a `display_report` input parameter (default: "true") that controls whether the Claude Code Report is written to the GitHub Step Summary. Setting it to "false" allows users with custom formatting solutions to avoid duplicate output in the step summary. Closes #206 Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Ashwin Bhat <[email protected]>
1 parent f6a1c4c commit cc5ef44

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎action.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ inputs:
121121
description: "Optional path to a custom Bun executable. If provided, skips automatic Bun installation and uses this executable instead. WARNING: Using an incompatible version may cause problems if the action requires specific Bun features. This input is typically not needed unless you're debugging something specific or have unique needs in your environment."
122122
required: false
123123
default: ""
124+
display_report:
125+
description: "Whether to display the Claude Code Report in GitHub Step Summary. Set to 'false' to disable when using custom formatting solutions."
126+
required: false
127+
default: "true"
124128
show_full_output:
125129
description: "Show full JSON output from Claude Code. WARNING: This outputs ALL Claude messages including tool execution results which may contain secrets, API keys, or other sensitive information. These logs are publicly visible in GitHub Actions. Only enable for debugging in non-sensitive environments."
126130
required: false
@@ -218,6 +222,7 @@ runs:
218222
INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE: ${{ inputs.path_to_claude_code_executable }}
219223
INPUT_PATH_TO_BUN_EXECUTABLE: ${{ inputs.path_to_bun_executable }}
220224
INPUT_SHOW_FULL_OUTPUT: ${{ inputs.show_full_output }}
225+
DISPLAY_REPORT: ${{ inputs.display_report }}
221226
INPUT_PLUGINS: ${{ inputs.plugins }}
222227
INPUT_PLUGIN_MARKETPLACES: ${{ inputs.plugin_marketplaces }}
223228
PATH_TO_CLAUDE_CODE_EXECUTABLE: ${{ inputs.path_to_claude_code_executable }}

‎src/entrypoints/run.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ async function run() {
295295
}
296296
}
297297

298-
// Write step summary
299-
if (executionFile && existsSync(executionFile)) {
298+
// Write step summary (unless display_report is set to false)
299+
if (
300+
executionFile &&
301+
existsSync(executionFile) &&
302+
process.env.DISPLAY_REPORT !== "false"
303+
) {
300304
await writeStepSummary(executionFile);
301305
}
302306

0 commit comments

Comments
 (0)