-
Notifications
You must be signed in to change notification settings - Fork 237
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
Added examples for policy commands #769
Conversation
Codecov Report
@@ Coverage Diff @@
## master #769 +/- ##
=======================================
Coverage 32.77% 32.77%
=======================================
Files 46 46
Lines 5415 5415
=======================================
Hits 1775 1775
Misses 3387 3387
Partials 253 253
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
cmd/policy/policy.go
Outdated
@@ -83,7 +83,7 @@ func NewCommand(config *settings.Config, preRunE validator.Validator) *cobra.Com | |||
return nil | |||
}, | |||
Args: cobra.ExactArgs(1), | |||
Example: `policy push ./policy_bundle_dir_path --owner-id 462d67f8-b232-4da4-a7de-0c86dd667d3f --context config`, | |||
Example: `policy push ./config --owner-id 462d67f8-b232-4da4-a7de-0c86dd667d3f`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folder to be pushed being called config is confusing.
Policy push ./policies seems better.
There's the confusion between the context config and the folder config...
cmd/policy/policy.go
Outdated
@@ -117,7 +117,8 @@ func NewCommand(config *settings.Config, preRunE validator.Validator) *cobra.Com | |||
|
|||
return prettyJSONEncoder(cmd.OutOrStdout()).Encode(diff) | |||
}, | |||
Args: cobra.ExactArgs(1), | |||
Args: cobra.ExactArgs(1), | |||
Example: `policy diff ./config --owner-id 462d67f8-b232-4da4-a7de-0c86dd667d3f`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
cmd/policy/policy.go
Outdated
@@ -356,7 +358,8 @@ func NewCommand(config *settings.Config, preRunE validator.Validator) *cobra.Com | |||
|
|||
return nil | |||
}, | |||
Args: cobra.ExactArgs(1), | |||
Args: cobra.ExactArgs(1), | |||
Example: `policy eval ./config --input ./.circleci/config.yml`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
@@ -264,13 +265,13 @@ func NewCommand(config *settings.Config, preRunE validator.Validator) *cobra.Com | |||
|
|||
cmd := &cobra.Command{ | |||
Short: "make a decision", | |||
Use: "decide", | |||
Use: "decide [policy_file_or_dir_path]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @sagar-connect,
* added examples for policy commands * updated example
Checklist
=========
Changes
=======