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

Allow ad-hoc revealing of private commands, flags, and environment variables #550

Merged
merged 7 commits into from
Aug 15, 2024

Conversation

DannyBen
Copy link
Owner

@DannyBen DannyBen commented Aug 15, 2024

Adds a settings option (private_reveal_key), that if set, will allow users to reveal private commands, flags and environment variables by setting an environment variable with this name:

# settings.yml
private_reveal_key: PRIVATE_ACCESS

Discovered in #548

Todo

  • Initial pilot
  • Confirmed implementation
  • Example
  • Tests
  • Update settings JSON schema
  • Update mandoc rendering (separate PR)
  • Update markdown rendering (separate PR)
  • Update completions rendering (separate PR)
  • Specs pass
  • Rubocop pass
  • Update doc site

Sample bashly.yml

name: cli
help: Sample application
version: 0.1.0

environment_variables:
- name: secret
  help: Set secret key
  private: true

flags:
- long: --debug
  help: Enable debug mode
  private: true

commands:
- name: admin
  help: Admin operations
  expose: true

  commands:
  - name: list
    help: List connected devices    
  - name: reboot
    help: Reboot
    private: true

@DannyBen
Copy link
Owner Author

@EmilyGraceSeville7cf - one more if you can: Minor change in settings schema
This one can either be nil or a string.

@DannyBen DannyBen merged commit af15e64 into master Aug 15, 2024
8 checks passed
@DannyBen DannyBen deleted the refactor/private-commands branch August 15, 2024 07:57
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.

2 participants