Skip to content

Conversation

birjj
Copy link
Contributor

@birjj birjj commented Aug 26, 2025

This adds support for the color input, which maps to the --color parameter for Zizmor. This allows callers to control whether the colorization should happen or not. Fixes #36.

I wasn't sure if we wanted to standardize on color: false to disable colors, or color: never which aligns with zizmor's parameter. I ended up aligning with zizmor, but have found it to be slightly confusing for people who are more used to GHA 🤷 I'll let it be up to the maintainer to decide, but am happy to implement whatever we land on.
I chose to revert this design. It looks like the rest of the inputs are designed to be inputs to the action, not to zizmor itself, so it makes more sense to have color: false than color: never ("never" being nonsensical for the action).

As part of implementing this I have switched from the current hardcoded FORCE_COLOR=1 env variable to passing --color=always by default. As far as I understand this should have no functional difference, other than version support (with --color being supported from v1.5.0+ of Zizmor). I'm unsure if that incompatibility with old versions is worth working around.

Copy link

kusari-inspector bot commented Aug 26, 2025

Kusari Inspector

Kusari Analysis Results:

Proceed with these changes

✅ No Flagged Issues Detected
All values appear to be within acceptable risk parameters.

No pinned version dependency changes, code issues or exposed secrets detected!

@kusari-inspector rerun - Trigger a re-analysis of this PR
@kusari-inspector feedback [your message] - Send feedback to our AI and team
See Kusari's documentation for setup and configuration.
Commit: 960f52e, performed at: 2025-08-26T09:49:08Z

Found this helpful? Give it a 👍 or 👎 reaction!

Copy link

Kusari PR Analysis rerun based on - d979586 performed at: 2025-08-26T09:52:24Z - link to updated analysis

@birjj birjj marked this pull request as ready for review August 26, 2025 10:37
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @birjj, this looks great to me. Could you add it to the inputs section of the README as well?

@woodruffw woodruffw added the enhancement New feature or request label Aug 27, 2025
@woodruffw
Copy link
Member

As part of implementing this I have switched from the current hardcoded FORCE_COLOR=1 env variable to passing --color=always by default. As far as I understand this should have no functional difference, other than version support (with --color being supported from v1.5.0+ of Zizmor). I'm unsure if that incompatibility with old versions is worth working around.

Thanks for calling this out -- I think this'll be fine, since zizmor's official images don't even support versions before 1.5.2 🙂

Copy link

Kusari PR Analysis rerun based on - 435d97b performed at: 2025-08-27T09:35:02Z - link to updated analysis

Copy link

Kusari PR Analysis rerun based on - 960f52e performed at: 2025-08-27T10:06:06Z - link to updated analysis

@birjj
Copy link
Contributor Author

birjj commented Aug 27, 2025

Could you add it to the inputs section of the README as well?

Done, good catch 👍

I've also gone ahead and refactored the inputs so it's now color: false to disable the color, not color: never. The rest of the inputs look like they're designed as inputs to the action, not to zizmor, so color: false makes more sense ("never" only really makes sense if there's some kind of detection going on that we're disabling, as with zizmor, not if we're explicitly disabling color for the specific action invocation).

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@woodruffw woodruffw merged commit a8fb1d7 into zizmorcore:main Aug 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot disable colorized output
2 participants