Skip to content

Commit

Permalink
fix(aws-codecommit): make the CodePipeline Action CloudWatch Event re…
Browse files Browse the repository at this point in the history
…spect creating the branch as well.
  • Loading branch information
skinny85 committed Dec 11, 2018
1 parent 3fdbc95 commit 7c013c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
],
"detail": {
"event": [
"referenceCreated",
"referenceUpdated"
],
"referenceName": [
Expand Down Expand Up @@ -386,4 +387,4 @@
}
}
}
}
}
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-codecommit/lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
],
"detail": {
"event": [
"referenceCreated",
"referenceUpdated"
],
"referenceName": [
Expand Down Expand Up @@ -599,4 +600,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
],
"detail": {
"event": [
"referenceCreated",
"referenceUpdated"
],
"referenceName": [
Expand Down Expand Up @@ -289,4 +290,4 @@
}
}
}
}
}

0 comments on commit 7c013c8

Please sign in to comment.