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: don't set the secret key to upper case by default #167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion phase_cli/cmd/secrets/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def phase_secrets_create(key=None, env_name=None, phase_app=None, random_type=No
key = input("🗝️\u200A Please enter the key: ")

# Replace spaces in the key with underscores
key = key.replace(' ', '_').upper()
key = key.replace(' ', '_')

# Generate a random value or get value from user, unless override is enabled
if override:
Expand Down
3 changes: 0 additions & 3 deletions phase_cli/cmd/secrets/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ def phase_secrets_delete(keys_to_delete: List[str] = None, env_name: str = None,
keys_to_delete_input = input("Please enter the keys to delete (separate multiple keys with a space): ")
keys_to_delete = keys_to_delete_input.split()

# Convert each key to uppercase
keys_to_delete = [key.upper() for key in keys_to_delete]

try:
# Delete keys within the specified path and get the list of keys not found
keys_not_found = phase.delete(env_name=env_name, keys_to_delete=keys_to_delete, app_name=phase_app, path=path)
Expand Down
2 changes: 1 addition & 1 deletion phase_cli/cmd/secrets/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def phase_secrets_get(key, env_name=None, phase_app=None, tags=None, path='/'):
console = Console()

try:
key = key.upper()

secrets_data = phase.get(env_name=env_name, keys=[key], app_name=phase_app, tag=tags, path=path)

# Find the specific secret for the given key within the provided path
Expand Down
2 changes: 1 addition & 1 deletion phase_cli/cmd/secrets/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def phase_secrets_update(key, env_name=None, phase_app=None, random_type=None, r
key = input("🗝️\u200A Please enter the key: ")

# Replace spaces in the key with underscores
key = key.replace(' ', '_').upper()
key = key.replace(' ', '_')

# Check if toggle_override is provided, if so, do not prompt for a new value
if toggle_override:
Expand Down
Loading