@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.332Z") @Stability(value=Stable) public class FilterGroup extends software.amazon.jsii.JsiiObject
Every condition in a given FilterGroup must be true in order for the whole group to be true.
You construct instances of it by calling the {@link #inEventOf} static factory method,
and then calling various andXyz instance methods to create modified instances of it
(this class is immutable).
You pass instances of this class to the webhookFilters property when constructing a source.
Example:
ISource gitHubSource = Source.gitHub(GitHubSourceProps.builder()
.owner("awslabs")
.repo("aws-cdk")
.webhook(true) // optional, default: true if `webhookFilters` were provided, false otherwise
.webhookTriggersBatchBuild(true) // optional, default is false
.webhookFilters(List.of(FilterGroup.inEventOf(EventAction.PUSH).andBranchIs("main").andCommitMessageIs("the commit message")))
.build());
| Modifier | Constructor and Description |
|---|---|
protected |
FilterGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
FilterGroup(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
FilterGroup |
andActorAccountIs(String pattern)
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must match the given pattern.
|
FilterGroup |
andActorAccountIsNot(String pattern)
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must not match the given pattern.
|
FilterGroup |
andBaseBranchIs(String branchName)
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given base branch.
|
FilterGroup |
andBaseBranchIsNot(String branchName)
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given base branch.
|
FilterGroup |
andBaseRefIs(String pattern)
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given Git reference.
|
FilterGroup |
andBaseRefIsNot(String pattern)
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given Git reference.
|
FilterGroup |
andBranchIs(String branchName)
Create a new FilterGroup with an added condition: the event must affect the given branch.
|
FilterGroup |
andBranchIsNot(String branchName)
Create a new FilterGroup with an added condition: the event must not affect the given branch.
|
FilterGroup |
andCommitMessageIs(String commitMessage)
Create a new FilterGroup with an added condition: the event must affect a head commit with the given message.
|
FilterGroup |
andCommitMessageIsNot(String commitMessage)
Create a new FilterGroup with an added condition: the event must not affect a head commit with the given message.
|
FilterGroup |
andFilePathIs(String pattern)
Create a new FilterGroup with an added condition: the push that is the source of the event must affect a file that matches the given pattern.
|
FilterGroup |
andFilePathIsNot(String pattern)
Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a file that matches the given pattern.
|
FilterGroup |
andHeadRefIs(String pattern)
Create a new FilterGroup with an added condition: the event must affect a Git reference (ie., a branch or a tag) that matches the given pattern.
|
FilterGroup |
andHeadRefIsNot(String pattern)
Create a new FilterGroup with an added condition: the event must not affect a Git reference (ie., a branch or a tag) that matches the given pattern.
|
FilterGroup |
andTagIs(String tagName)
Create a new FilterGroup with an added condition: the event must affect the given tag.
|
FilterGroup |
andTagIsNot(String tagName)
Create a new FilterGroup with an added condition: the event must not affect the given tag.
|
static FilterGroup |
inEventOf(EventAction... actions)
Creates a new event FilterGroup that triggers on any of the provided actions.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected FilterGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected FilterGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static FilterGroup inEventOf(@NotNull EventAction... actions)
actions - the actions to trigger the webhook on. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andActorAccountIs(@NotNull String pattern)
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andActorAccountIsNot(@NotNull String pattern)
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andBaseBranchIs(@NotNull String branchName)
Note that you cannot use this method if this Group contains the PUSH event action.
branchName - the name of the branch (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andBaseBranchIsNot(@NotNull String branchName)
Note that you cannot use this method if this Group contains the PUSH event action.
branchName - the name of the branch (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andBaseRefIs(@NotNull String pattern)
Note that you cannot use this method if this Group contains the PUSH event action.
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andBaseRefIsNot(@NotNull String pattern)
Note that you cannot use this method if this Group contains the PUSH event action.
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andBranchIs(@NotNull String branchName)
branchName - the name of the branch (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andBranchIsNot(@NotNull String branchName)
branchName - the name of the branch (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andCommitMessageIs(@NotNull String commitMessage)
commitMessage - the commit message (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andCommitMessageIsNot(@NotNull String commitMessage)
commitMessage - the commit message (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andFilePathIs(@NotNull String pattern)
Note that you can only use this method if this Group contains only the PUSH event action,
and only for GitHub, Bitbucket and GitHubEnterprise sources.
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andFilePathIsNot(@NotNull String pattern)
Note that you can only use this method if this Group contains only the PUSH event action,
and only for GitHub, Bitbucket and GitHubEnterprise sources.
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andHeadRefIs(@NotNull String pattern)
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andHeadRefIsNot(@NotNull String pattern)
pattern - a regular expression. This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andTagIs(@NotNull String tagName)
tagName - the name of the tag (can be a regular expression). This parameter is required.@Stability(value=Stable) @NotNull public FilterGroup andTagIsNot(@NotNull String tagName)
tagName - the name of the tag (can be a regular expression). This parameter is required.Copyright © 2022. All rights reserved.