aws-codecommit: IRepository does not allow 'notify' triggers #29105
Labels
@aws-cdk/aws-codecommit
Related to AWS CodeCommit
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
When I import a repository, I am unable to use the repo.notify event. It does work when I create a new repo.
This fails:
This works:
Expected Behavior
I expect this to not produce an error:
Current Behavior
I get the following error:
Property 'notify' does not exist on type 'IRepository'. Did you mean 'notifyOn'?
Reproduction Steps
TSError: ⨯ Unable to compile TypeScript:
codePipelineStack.ts:65:12 - error TS2551: Property 'notify' does not exist on type 'IRepository'. Did you mean 'notifyOn'?
65 repo.notify(handler.functionArn, {
~~~~~~
../node_modules/aws-cdk-lib/aws-codecommit/lib/repository.d.ts:116:5
116 notifyOn(id: string, target: notifications.INotificationRuleTarget, options: RepositoryNotifyOnOptions): notifications.INotificationRule;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'notifyOn' is declared here.
Possible Solution
Add the notify type to the IRepository class in addition to the Repository class.
Additional Information/Context
No response
CDK CLI Version
2.127.0
Framework Version
No response
Node.js Version
v20.10.0
OS
ubuntu
Language
TypeScript
Language Version
3.9.7
Other information
No response
The text was updated successfully, but these errors were encountered: