Skip to content
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

feat(cli): add flag to disable update notifications #1740

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

ahmadnassri
Copy link
Contributor

@ahmadnassri ahmadnassri commented Sep 19, 2024

What/Why/How?

allow skipping update checks in the cli by setting REDOCLY_SUPPRESS_UPDATE_NOTICE=true, useful for local development mode / production environments

the format of REDOCLY_SUPPRESS_UPDATE_NOTICE borrows from npm's NPM_CONFIG_UPDATE_NOTIFIER for familiarity / consistency.

Reference

Resolves #1639

Testing

no testing exists for this particular CLI path, so I did not include any additional tests.

Screenshots (optional)

N/A

Check yourself

  • Code changed? - Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests
  • New package installed? - Tested in different environments (browser/node)

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@ahmadnassri ahmadnassri requested a review from a team as a code owner September 19, 2024 17:40
Copy link

changeset-bot bot commented Sep 19, 2024

🦋 Changeset detected

Latest commit: 0e40999

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@redocly/cli Patch
@redocly/openapi-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tatomyr
Copy link
Contributor

tatomyr commented Sep 20, 2024

Thanks @ahmadnassri for the contribution!
@lornajane, could you take a look at the naming/behaviour when you have time?

@lornajane
Copy link
Collaborator

Thanks @ahmadnassri , this is a nice addition and it works as expected! We typically operate a zero-config convention where everything is false by default, and configuration can be added to change the behaviour. So for naming, how about REDOCLY_SUPPRESS_UPDATE_NOTICE ?

@ahmadnassri
Copy link
Contributor Author

Thanks @ahmadnassri , this is a nice addition and it works as expected! We typically operate a zero-config convention where everything is false by default, and configuration can be added to change the behaviour. So for naming, how about REDOCLY_SUPPRESS_UPDATE_NOTICE ?

can certainly change the behaviour.

@ahmadnassri
Copy link
Contributor Author

@lornajane updated the PR accordingly.

@lornajane lornajane self-requested a review October 18, 2024 12:47
Copy link
Collaborator

@lornajane lornajane left a comment

Choose a reason for hiding this comment

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

Thanks @ahmadnassri !

@tatomyr tatomyr merged commit 6f870fd into Redocly:main Oct 18, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suppress update now logging
3 participants