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(nats): Add NATS Context #5900

Merged
merged 9 commits into from May 15, 2024
Merged

Conversation

hooksie1
Copy link
Contributor

@hooksie1 hooksie1 commented Mar 30, 2024

Description

Adds a module for getting the current NATS context. Uses the nats cli to get the current context name.

Motivation and Context

This is similar to having the Kubernetes context displayed so it's always known which context you are in.

Screenshots (if appropriate):

Screenshot 2024-03-30 at 17 41 46

How Has This Been Tested?

Added the mock nats cli and then created tests to make sure styling matched.
Also built locally and tested changing contexts and styles.

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@hooksie1 hooksie1 changed the title Add NATS Context feat: Add NATS Context Mar 30, 2024
@hooksie1 hooksie1 changed the title feat: Add NATS Context feat(nats): Add NATS Context Mar 30, 2024
@hooksie1 hooksie1 marked this pull request as draft March 30, 2024 22:05
@hooksie1 hooksie1 marked this pull request as ready for review March 30, 2024 22:35
@hooksie1
Copy link
Contributor Author

I'm not sure what's going on with the print all tests.

@hooksie1
Copy link
Contributor Author

Ah, helps if I read the test output correctly.

src/configs/nats.rs Outdated Show resolved Hide resolved
src/modules/nats.rs Outdated Show resolved Hide resolved
Copy link
Member

@davidkna davidkna left a comment

Choose a reason for hiding this comment

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

I have made a few more suggestions, but this is already looking fairly good.

docs/config/README.md Outdated Show resolved Hide resolved
src/modules/nats.rs Outdated Show resolved Hide resolved
src/modules/nats.rs Outdated Show resolved Hide resolved
src/configs/nats.rs Outdated Show resolved Hide resolved
@hooksie1
Copy link
Contributor Author

hooksie1 commented May 7, 2024

I'm not sure what the config is failing on. I ran cargo run --features config-schema -- config-schema > .github/config-schema.json and it's not showing any changes locally.

Copy link
Member

@davidkna davidkna left a comment

Choose a reason for hiding this comment

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

LGTM

@davidkna davidkna merged commit 5facd85 into starship:master May 15, 2024
21 checks passed
@davidkna
Copy link
Member

Thanks for the contribution @hooksie1!

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.

None yet

2 participants