Skip to content
v2.278.0

GitPullRequestFilterProperty Struct ​

The event criteria for the pull request trigger configuration, such as the lists of branches or file paths to include and exclude.

The following are valid values for the events for this filter:

  • CLOSED
  • OPEN
  • UPDATED

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline as codepipeline } from 'aws-cdk-lib';
const gitPullRequestFilterProperty: codepipeline.CfnPipeline.GitPullRequestFilterProperty = {
  branches: {
    excludes: ['excludes'],
    includes: ['includes'],
  },
  events: ['events'],
  filePaths: {
    excludes: ['excludes'],
    includes: ['includes'],
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codepipeline as codepipeline

git_pull_request_filter_property = codepipeline.CfnPipeline.GitPullRequestFilterProperty(
    branches=codepipeline.CfnPipeline.GitBranchFilterCriteriaProperty(
        excludes=["excludes"],
        includes=["includes"]
    ),
    events=["events"],
    file_paths=codepipeline.CfnPipeline.GitFilePathFilterCriteriaProperty(
        excludes=["excludes"],
        includes=["includes"]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codepipeline.*;

GitPullRequestFilterProperty gitPullRequestFilterProperty = GitPullRequestFilterProperty.builder()
        .branches(GitBranchFilterCriteriaProperty.builder()
                .excludes(List.of("excludes"))
                .includes(List.of("includes"))
                .build())
        .events(List.of("events"))
        .filePaths(GitFilePathFilterCriteriaProperty.builder()
                .excludes(List.of("excludes"))
                .includes(List.of("includes"))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodePipeline;

var gitPullRequestFilterProperty = new GitPullRequestFilterProperty {
    Branches = new GitBranchFilterCriteriaProperty {
        Excludes = new [] { "excludes" },
        Includes = new [] { "includes" }
    },
    Events = new [] { "events" },
    FilePaths = new GitFilePathFilterCriteriaProperty {
        Excludes = new [] { "excludes" },
        Includes = new [] { "includes" }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

gitPullRequestFilterProperty := &GitPullRequestFilterProperty{
	Branches: &GitBranchFilterCriteriaProperty{
		Excludes: []*string{
			jsii.String("excludes"),
		},
		Includes: []*string{
			jsii.String("includes"),
		},
	},
	Events: []*string{
		jsii.String("events"),
	},
	FilePaths: &GitFilePathFilterCriteriaProperty{
		Excludes: []*string{
			jsii.String("excludes"),
		},
		Includes: []*string{
			jsii.String("includes"),
		},
	},
}

Properties ​

branchesoptionalIResolvable | CfnPipeline.GitBranchFilterCriteriaPropertybranchesoptionaltyping.Union[IResolvable, GitBranchFilterCriteriaProperty]branchesoptionalIResolvableBranchesoptionalIResolvableBranchesoptionalinterface{} #
The field that specifies to filter on branches for the pull request trigger configuration.
eventsoptionalstring[]eventsoptionaltyping.List[str]eventsoptionalList<String>Eventsoptionalstring[]Eventsoptional*[]*string #
The field that specifies which pull request events to filter on (OPEN, UPDATED, CLOSED) for the trigger configuration.
filePathsoptionalIResolvable | CfnPipeline.GitFilePathFilterCriteriaPropertyfile_pathsoptionaltyping.Union[IResolvable, GitFilePathFilterCriteriaProperty]filePathsoptionalIResolvableFilePathsoptionalIResolvableFilePathsoptionalinterface{} #
The field that specifies to filter on file paths for the pull request trigger configuration.