Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Account for --exit-zero-on-changes=true #1083

Conversation

codykaup
Copy link
Contributor

@codykaup codykaup commented Oct 7, 2024

Closes #973

If you pass something to --exit-zero-on-changes, the CLI assumes you're providing a branch name. However, if you pass --exit-zero-on-changes=true, it assumes true is the branch and essentially breaks the flag (unless your branch is literally true).

To account for this, we can simply check if the --exit-zero-on-changes contains the string 'true' when we set the exit code on the snapshot step.

📦 Published PR as canary version: 11.11.1--canary.1083.11219791549.0

✨ Test out this PR locally via:

npm install chromatic@11.11.1--canary.1083.11219791549.0
# or 
yarn add chromatic@11.11.1--canary.1083.11219791549.0

@codykaup codykaup added patch Auto: Increment the patch version when merged skip-release Auto: Preserve the current version when merged labels Oct 7, 2024
@codykaup codykaup self-assigned this Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

📦 Package Size: 5268 KB
✅ Compared to main: 0 KB bd798a1 (5268 KB)

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -1.00%) 100.00% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (bd798a1) 8606 4647 54.00%
Head commit (07459cc) 8607 (+1) 4648 (+1) 54.00% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1083) 1 1 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@codykaup codykaup requested a review from a team October 7, 2024 16:37
@codykaup codykaup added this pull request to the merge queue Oct 7, 2024
Merged via the queue into main with commit 59c5f54 Oct 7, 2024
26 checks passed
@codykaup codykaup deleted the cody/cap-2285--exit-zero-on-changes-true-flag-does-not-change-anything branch October 7, 2024 17:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
patch Auto: Increment the patch version when merged skip-release Auto: Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--exit-zero-on-changes true flag does not change anything
2 participants