You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: add option unacknowledged to cdk notices (#31250)
### Issue # (if applicable)
Closes#23078
### Reason for this change
`cdk notices` will show all the notices the cdk version is affected by.
The additional command `cdk notices --unacknowledged` will show the notices the customer hasn't acknowledge with `cdk acknowledge <NUMBER>`.
The output will display the number of unacknowledged notices, with the following line as the last statement:
`There are <NUMBER> unacknowledged notice(s).`
Customer or automation tools can use this command to filter for the number of unacknowledged notices.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/aws-cdk/lib/cli.ts
+11-2
Original file line number
Diff line number
Diff line change
@@ -268,7 +268,9 @@ async function parseCommandLineArguments(args: string[]) {
268
268
.option('change-set',{type: 'boolean',alias: 'changeset',desc: 'Whether to create a changeset to analyze resource replacements. In this mode, diff will use the deploy role instead of the lookup role.',default: true}))
269
269
.command('metadata [STACK]','Returns all metadata associated with this stack')
270
270
.command(['acknowledge [ID]','ack [ID]'],'Acknowledge a notice so that it does not show up anymore')
271
-
.command('notices','Returns a list of relevant notices')
271
+
.command('notices','Returns a list of relevant notices',(yargs: Argv)=>yargs
272
+
.option('unacknowledged',{type: 'boolean',alias: 'u',default: false,desc: 'Returns a list of unacknowledged notices'}),
273
+
)
272
274
.command('init [TEMPLATE]','Create a new, empty CDK project from a template.',(yargs: Argv)=>yargs
273
275
.option('language',{type: 'string',alias: 'l',desc: 'The language to be used for the new project (default can be configured in ~/.cdk.json)',choices: initTemplateLanguages})
274
276
.option('list',{type: 'boolean',desc: 'List the available templates'})
0 commit comments