diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-events.expected.json b/packages/@aws-cdk/aws-codebuild/test/integ.project-events.expected.json index 82ec4b39bd6cb..d1c87af113950 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-events.expected.json +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-events.expected.json @@ -27,6 +27,7 @@ ], "detail": { "event": [ + "referenceCreated", "referenceUpdated" ], "referenceName": [ @@ -386,4 +387,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-codecommit/lib/repository.ts b/packages/@aws-cdk/aws-codecommit/lib/repository.ts index 76dc46cf834d9..718fd1abd0a8c 100644 --- a/packages/@aws-cdk/aws-codecommit/lib/repository.ts +++ b/packages/@aws-cdk/aws-codecommit/lib/repository.ts @@ -104,7 +104,7 @@ export abstract class RepositoryRef extends cdk.Construct { /** * Defines a CloudWatch event rule which triggers when a reference is - * created (i.e. a new brach/tag is created) to the repository. + * created (i.e. a new branch/tag is created) to the repository. */ public onReferenceCreated(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) { const rule = this.onStateChange(name, target, options); @@ -114,11 +114,11 @@ export abstract class RepositoryRef extends cdk.Construct { /** * Defines a CloudWatch event rule which triggers when a reference is - * updated (i.e. a commit is pushed to an existig branch) from the repository. + * updated (i.e. a commit is pushed to an existing or new branch) from the repository. */ public onReferenceUpdated(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) { const rule = this.onStateChange(name, target, options); - rule.addEventPattern({ detail: { event: [ 'referenceUpdated' ] } }); + rule.addEventPattern({ detail: { event: [ 'referenceCreated', 'referenceUpdated' ] } }); return rule; } diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json index 3c94a18f54246..fced0f5d6d44e 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-build-multiple-inputs-outputs.expected.json @@ -27,6 +27,7 @@ ], "detail": { "event": [ + "referenceCreated", "referenceUpdated" ], "referenceName": [ @@ -599,4 +600,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit.expected.json b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit.expected.json index 94dca9257ab14..b6e9ea9fa6c85 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit.expected.json +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit.expected.json @@ -27,6 +27,7 @@ ], "detail": { "event": [ + "referenceCreated", "referenceUpdated" ], "referenceName": [ @@ -289,4 +290,4 @@ } } } -} \ No newline at end of file +}