EventAction

class aws_cdk.aws_codebuild.EventAction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The types of webhook event actions.

ExampleMetadata:

infused

Example:

git_hub_source = codebuild.Source.git_hub(
    owner="awslabs",
    repo="aws-cdk",  # optional, default: undefined if unspecified will create organization webhook
    webhook=True,  # optional, default: true if `webhookFilters` were provided, false otherwise
    webhook_triggers_batch_build=True,  # optional, default is false
    webhook_filters=[
        codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message"),
        codebuild.FilterGroup.in_event_of(codebuild.EventAction.RELEASED).and_branch_is("main")
    ]
)

Attributes

PRERELEASED

A prerelease is created in the repository.

Works with GitHub only.

PULL_REQUEST_CLOSED

Closing a Pull Request.

PULL_REQUEST_CREATED

Creating a Pull Request.

PULL_REQUEST_MERGED

Merging a Pull Request.

PULL_REQUEST_REOPENED

Re-opening a previously closed Pull Request.

Note that this event is only supported for GitHub and GitHubEnterprise sources.

PULL_REQUEST_UPDATED

Updating a Pull Request.

PUSH

A push (of a branch, or a tag) to the repository.

RELEASED

A release is created in the repository.

Works with GitHub only.

WORKFLOW_JOB_QUEUED

A workflow job is queued in the repository.

Works with GitHub only.