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: Open Policy Agent module (#1740) #4441

Merged
merged 5 commits into from Oct 15, 2022

Conversation

Scotsguy
Copy link
Contributor

@Scotsguy Scotsguy commented Oct 3, 2022

Description

Adds a module for the Open Policy Agent tool, opa.
This assumes that people put the opa binary on $PATH, as it seems to not really be packaged apart from Docker Hub.

Emoji was picked because it's the closest to the official logo, which is a horned hat.

Largely based on the bun module and other modules that just run a command and parse it.

Upstream will likely not change the output of opa version, as they're conscious of it potentially being parsed; see https://github.com/open-policy-agent/opa/blob/15b9a884cd5f5fd403cec9929fa58d86b0a9046f/cmd/version.go

Motivation and Context

Closes #1740

Screenshots (if appropriate):

image

How Has This Been Tested?

  • 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.

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.

Thanks for the contribution! This PR mostly looks good, but please address my comments.

Please also update the presets as required in docs/.vuepress/public/presets/toml.

docs/config/README.md Outdated Show resolved Hide resolved
src/configs/opa.rs Outdated Show resolved Hide resolved
Scotsguy and others added 2 commits October 9, 2022 19:02
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
@Scotsguy
Copy link
Contributor Author

Scotsguy commented Oct 9, 2022

Presets updated, at least the ones I think are relevant (?). There are no nerd fonts icons for OPA.

@davidkna davidkna merged commit 865e68d into starship:master Oct 15, 2022
Indyandie pushed a commit to Indyandie/starship that referenced this pull request Jul 26, 2023
* feat: Open Policy Agent module (starship#1740)

* Format documentation

* Fix typo, `ropa` -> `rego`

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Update presets for OPA module

* Add extra space to OPA module symbol

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
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.

[feature request] OPA(Open Policy Agent) Support
2 participants