docker / cli

The Docker CLI
Apache License 2.0
4.77k stars 1.89k forks source link

[26.1 backport] plugins/hooks: Don't show empty hook messages #5083

Closed vvoland closed 1 month ago

vvoland commented 2 months ago

- What I did Don't show Next steps: with no messages at all when plugin returns an unitialized value of HookMessage (zero-initialization sets its type to NextSteps and empty template).

- How to verify it Unit test

- Description for the changelog

Don't show empty hints when plugins returns an empty hook message.

- A picture of a cute animal (not mandatory but encouraged)

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 61.34%. Comparing base (b72abbb) to head (e382a5f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 26.1 #5083 +/- ## ========================================== - Coverage 61.34% 61.34% -0.01% ========================================== Files 298 298 Lines 20688 20700 +12 ========================================== + Hits 12691 12698 +7 - Misses 7096 7100 +4 - Partials 901 902 +1 ```
thaJeztah commented 1 month ago

Moving this to draft; we're discussing if it's needed.