Skip to content
v2.278.0

GitPullRequestFilter Struct ​

Git pull request filter for trigger.

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 gitPullRequestFilter: codepipeline.GitPullRequestFilter = {
  branchesExcludes: ['branchesExcludes'],
  branchesIncludes: ['branchesIncludes'],
  events: [codepipeline.GitPullRequestEvent.OPEN],
  filePathsExcludes: ['filePathsExcludes'],
  filePathsIncludes: ['filePathsIncludes'],
};
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 = codepipeline.GitPullRequestFilter(
    branches_excludes=["branchesExcludes"],
    branches_includes=["branchesIncludes"],
    events=[codepipeline.GitPullRequestEvent.OPEN],
    file_paths_excludes=["filePathsExcludes"],
    file_paths_includes=["filePathsIncludes"]
)
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.*;

GitPullRequestFilter gitPullRequestFilter = GitPullRequestFilter.builder()
        .branchesExcludes(List.of("branchesExcludes"))
        .branchesIncludes(List.of("branchesIncludes"))
        .events(List.of(GitPullRequestEvent.OPEN))
        .filePathsExcludes(List.of("filePathsExcludes"))
        .filePathsIncludes(List.of("filePathsIncludes"))
        .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 gitPullRequestFilter = new GitPullRequestFilter {
    BranchesExcludes = new [] { "branchesExcludes" },
    BranchesIncludes = new [] { "branchesIncludes" },
    Events = new [] { GitPullRequestEvent.OPEN },
    FilePathsExcludes = new [] { "filePathsExcludes" },
    FilePathsIncludes = new [] { "filePathsIncludes" }
};
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"

gitPullRequestFilter := &GitPullRequestFilter{
	BranchesExcludes: []*string{
		jsii.String("branchesExcludes"),
	},
	BranchesIncludes: []*string{
		jsii.String("branchesIncludes"),
	},
	Events: []GitPullRequestEvent{
		awscdk.Aws_codepipeline.GitPullRequestEvent_OPEN,
	},
	FilePathsExcludes: []*string{
		jsii.String("filePathsExcludes"),
	},
	FilePathsIncludes: []*string{
		jsii.String("filePathsIncludes"),
	},
}

Properties ​

branchesExcludesoptionalstring[]branches_excludesoptionaltyping.List[str]branchesExcludesoptionalList<String>BranchesExcludesoptionalstring[]BranchesExcludesoptional*[]*string #
The list of patterns of Git branches that, when pull request events occurs, are to be excluded from starting the pipeline.

Default: no branches.

You can filter with glob patterns. The branchesExcludes takes priority over the branchesIncludes.

Maximum length of this array is 8.

branchesIncludesoptionalstring[]branches_includesoptionaltyping.List[str]branchesIncludesoptionalList<String>BranchesIncludesoptionalstring[]BranchesIncludesoptional*[]*string #
The list of patterns of Git branches that, when pull request events occurs, are to be included as criteria that starts the pipeline.

Default: no branches.

You can filter with glob patterns. The branchesExcludes takes priority over the branchesIncludes.

Maximum length of this array is 8.

eventsoptionalGitPullRequestEvent[]eventsoptionaltyping.List[GitPullRequestEvent]eventsoptionalList<GitPullRequestEvent>EventsoptionalGitPullRequestEvent[]Eventsoptional*[]GitPullRequestEvent #
The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger configuration.

Default: all events.

filePathsExcludesoptionalstring[]file_paths_excludesoptionaltyping.List[str]filePathsExcludesoptionalList<String>FilePathsExcludesoptionalstring[]FilePathsExcludesoptional*[]*string #
The list of patterns of Git repository file paths that, when pull request events occurs, are to be excluded from starting the pipeline.

Default: no filePaths.

You can filter with glob patterns. The filePathsExcludes takes priority over the filePathsIncludes.

Maximum length of this array is 8.

filePathsIncludesoptionalstring[]file_paths_includesoptionaltyping.List[str]filePathsIncludesoptionalList<String>FilePathsIncludesoptionalstring[]FilePathsIncludesoptional*[]*string #
The list of patterns of Git repository file paths that, when pull request events occurs, are to be included as criteria that starts the pipeline.

Default: no filePaths.

You can filter with glob patterns. The filePathsExcludes takes priority over the filePathsIncludes.

Maximum length of this array is 8.