Skip to content

Commit

Permalink
feat(aws-codebuild): support pull_request_merged eventaction type (#3575
Browse files Browse the repository at this point in the history
)

* feat(aws-codebuild): support pull_request_merged eventaction type Added PULL_REQUEST_MERGED type to the EventAction Enum for use in source webhook filter groups closes #3557

* feat(aws-codebuild): fix trailing comma in codebuild test file
  • Loading branch information
mbruning24 authored and mergify[bot] committed Aug 7, 2019
1 parent 254f62c commit 5d4a275
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/@aws-cdk/aws-codebuild/lib/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,15 @@ export enum EventAction {
PULL_REQUEST_CREATED = 'PULL_REQUEST_CREATED',

/**
* Updating an Pull Request.
* Updating a Pull Request.
*/
PULL_REQUEST_UPDATED = 'PULL_REQUEST_UPDATED',

/**
* Merging a Pull Request.
*/
PULL_REQUEST_MERGED = 'PULL_REQUEST_MERGED',

/**
* Re-opening a previously closed Pull Request.
* Note that this event is only supported for GitHub and GitHubEnterprise sources.
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ export = {
codebuild.FilterGroup.inEventOf(
codebuild.EventAction.PULL_REQUEST_CREATED,
codebuild.EventAction.PULL_REQUEST_UPDATED,
codebuild.EventAction.PULL_REQUEST_MERGED,
).andTagIs('v.*'),
// duplicate event actions are fine
codebuild.FilterGroup.inEventOf(codebuild.EventAction.PUSH, codebuild.EventAction.PUSH).andActorAccountIsNot('aws-cdk-dev'),
Expand All @@ -602,7 +603,7 @@ export = {
Webhook: true,
FilterGroups: [
[
{ Type: 'EVENT', Pattern: 'PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED' },
{ Type: 'EVENT', Pattern: 'PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_MERGED' },
{ Type: 'HEAD_REF', Pattern: 'refs/tags/v.*' },
],
[
Expand Down

0 comments on commit 5d4a275

Please sign in to comment.