Add disable-command-output-logging hook property - #761
Conversation
Fixes adnanh#680. Adds a per-hook boolean to skip logging command output on successful executions while still logging on errors. Defaults to false for backward compatibility.
|
Hi @adnanh, Could you please try to retry the workflow to see if it passes on the next attempt? Thank you! |
adnanh
left a comment
There was a problem hiding this comment.
The implementation looks correct and preserves existing behavior: false remains the default, so existing configurations continue logging command output.
One requested change: please document disable-command-output-logging in docs/Hook-Definition.md, including that it defaults to false, suppresses output only for successful commands, and still logs output when execution fails.
Non-blocking: consider testing this through actual JSON and YAML hook configurations. The current tests set the Go field directly, so they do not verify that the public configuration key is parsed correctly.
Also, consider restoring the previous log.Writer() in the test rather than assuming os.Stderr.
Summary
disable-command-output-loggingboolean propertytrue, suppressescommand output:log line on successful executionsfalse)Fixes #680
Test plan
go test -run TestDisableCommandOutputLogging -vgo test ./...