-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: JSON output #514
Comments
Hi @petermikitsh 👋 Do you just want the format to be JSON for ease in parsing? Is there any extra information in the JSON object compared to the current output? |
Correct, yes! To expand on the request, I would imagine the CLI would expect some sort of output parameter, eg: - OUTPUT=$(npx --no-install chromatic --project-token=REDACTED)
+ OUTPUT=$(npx --no-install chromatic --project-token=REDACTED --output json)
I'm still familiarizing myself with the CLI, but the main pieces of useful output would be:
Taking a step back, I just want to be able to effectively utilize a PR comment as a call-to-action for developers, so they don't have to dig through the log output to identify the reason of why their build is failing. I'm migrating my projects from puppeteer storyshots to Chromatic. In this existing workflow, the PR comment on failure would look something like this, and developers would know to push another commit with updated baseline images: |
@petermikitsh have you seen the |
We've had a few requests for something like this. I wrote up an internal project so we can discuss adding this feature in the future. Unfortunately, there's no guarantees we'll have time to work on it. If you'd like to see JSON output added, feel free to leave a 👍 on this issue so we have a clearer picture of the impact! |
It would be useful if Chromatic CLI could output, for example, something like this (note: I am open to whatever JSON shape the Chromatic team would prefer):
I could then parse this with a tool like
jq
and leave a comment on my PR using thegh
cli.The text was updated successfully, but these errors were encountered: