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

chore(cli): aliased commands can be converted to cli args #32806

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

kaizencc
Copy link
Contributor

@kaizencc kaizencc commented Jan 9, 2025

This PR does not currently change CLI functionality. The function convertToCliArgs is not used in the CLI yet which is why this PR is not fixing a regression. It will eventually be used to strongly-type cli arguments.

Previously, aliased commands, like cdk ack instead of cdk acknowledge would fall through the cracks of the generated convert function. The switch statement was only switching on command names so we would not store any options associated with an aliased command. Specifically, cdk synth --exclusively would not store the exclusively flag in the ensuing CliArguments object because synth is an alias.

Now we do. This is an additional step forward to being able to use CliArguments in cli.ts


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@kaizencc kaizencc requested a review from a team as a code owner January 9, 2025 04:32
@kaizencc kaizencc added the pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested label Jan 9, 2025
@github-actions github-actions bot added the p2 label Jan 9, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 9, 2025 04:32
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 9, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 9, 2025
Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

Code looks good, but I think your PR description and inline code needs to be expanded. Explain why this wasn't a problem so far (i.e. why is this PR not a fix or even p0 regression) and what (future) problem you are solving by adding aliases.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 9, 2025
Copy link
Contributor

mergify bot commented Jan 9, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 34339c1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Jan 9, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@kaizencc kaizencc merged commit d6013a7 into main Jan 9, 2025
10 of 11 checks passed
@kaizencc kaizencc deleted the conroy/aliases branch January 9, 2025 22:04
Copy link

github-actions bot commented Jan 9, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2 pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants