summary - suppress spinner if noColor is true #151
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This behavior is consistent with how html-report behaves, and is desireable for CI environments such as GitHub Actions where the spinner output won't look near as pretty.
I'm attempting to embed openapi-changes into a GitHub workflow, so that I can have it error a check on a PR if a PR were to introduce any breaking changes. I'm using the summary markdown output feature, in an action a little like this:
I noticed that the output from summary, even with
--no-logo --no-color --markdown
would include many lines from the spinner, and ultimately caused a few rendering issues within the markdown as well.Before:
starting work.
Extracting history for 'services/my-service.yml' in repo './
extacted commit '8ce8c30'
extacted commit '639401d'
extacted commit 'a7852bf'
extacted commit '06c5e75'
extacted commit 'cd766d0'
SPEC: 5 commits extracted
Extracting 10 bytes extracted from commit '8ce8c30'
Extracting 10 bytes extracted from commit '639401d'
Extracting 9 bytes extracted from commit 'a7852bf'
Extracting 9 bytes extracted from commit '06c5e75'
Extracting 9 bytes extracted from commit 'cd766d0'
Building original model for commit 06c5e7
Building original model for commit a7852b
Building original model for commit 639401
Building original model for commit 8ce8c3
SPEC: 5 commits processed and populated| Document Element | Total Changes | Breaking Changes |
|------------------|---------------|------------------|
| paths | 1 | 1 |
Date: 07/25/24 | Commit: chore: remove test param fro my service getHealth
Date: 07/23/24 | Commit: chore: add tags and shorten server descriptions
Date: 07/23/24 | Commit: end to end test
Date: 07/22/24 | Commit: chore: add linting via spectral
SPEC: extracted 5 commits from history
DONE: completed
ERROR: breaking changes discovered
After:
Date: 07/25/24 | Commit: chore: remove test param fro app hub getHealth
Date: 07/23/24 | Commit: chore: add tags and shorten server descriptions
Date: 07/23/24 | Commit: end to end test
Date: 07/22/24 | Commit: chore: add linting via spectral
ERROR: breaking changes discovered
Error: breaking changes discovered