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: add --app-id flag #173

Merged
merged 20 commits into from
Oct 28, 2024
Merged

Feat: add --app-id flag #173

merged 20 commits into from
Oct 28, 2024

Conversation

nimish-ks
Copy link
Member

@nimish-ks nimish-ks commented Oct 23, 2024

Overview

This PR adds the ability to directly specify an application ID using the --app-id flag across the following commands:

phase secrets:

  • create
  • get
  • update
  • delete
  • list
  • export
  • import

phase:

  • run

This feature allows users to bypass name-based application lookup, making the CLI more robust when dealing with applications that might have similar names.

Key Changes

  • Added --app-id flag support to all relevant commands:
    • phase run
    • phase secrets create/update/delete/list/get/import/export
  • Modified phase_get_context to prioritize app_id over app_name when both are provided
  • Updated test suite to verify app ID functionality

Usage

# Using app ID directly
phase secrets list --app-id dc371163-6735-49d2-a25a-2ce0fc3e147d --env dev

# App ID takes precedence when both are specified
phase secrets get SECRET_KEY --app "MyApp" --app-id dc371163-6735-49d2-a25a-2ce0fc3e147d --env dev  # Will use dc371163-6735-49d2-a25a-2ce0fc3e147d

Testing

  • Added new test cases to verify app ID functionality
  • Updated existing tests to accommodate the new parameter
  • Manually verified all affected commands

Backwards Compatibility

This change is fully backwards compatible:

  • All existing commands continue to work as before
  • The --app flag remains supported and works as expected when --app-id is not provided

Copy link
Member

@rohan-chaturvedi rohan-chaturvedi left a comment

Choose a reason for hiding this comment

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

LGTM!

@nimish-ks nimish-ks merged commit 82a7036 into main Oct 28, 2024
13 checks passed
@nimish-ks nimish-ks deleted the feat--add-app-id branch October 28, 2024 14:54
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