Construction properties for GitHubSource and GitHubEnterpriseSource.
Inheritance
GitHubSourceProps
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GitHubSourceProps : IGitHubSourceProps, ISourceProps
Syntax (vb)
Public Class GitHubSourceProps Implements IGitHubSourceProps, ISourceProps
Examples
var gitHubSource = Source.GitHub(new GitHubSourceProps {
Owner = "aws",
WebhookTriggersBatchBuild = true, // optional, default is false
WebhookFilters = new [] { FilterGroup.InEventOf(EventAction.WORKFLOW_JOB_QUEUED).AndRepositoryNameIs("aws-.*").AndRepositoryNameIsNot("aws-cdk-lib") }
});
Synopsis
Constructors
Properties
| BranchOrRef | The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. |
| BuildStatusContext | This parameter is used for the |
| BuildStatusUrl | The URL that the build will report back to the source provider. |
| CloneDepth | The depth of history to download. |
| FetchSubmodules | Whether to fetch submodules while cloning git repo. |
| Identifier | The source identifier. |
| Owner | The GitHub Organization/user that owns the repo. |
| Repo | The name of the repo (without the username). |
| ReportBuildStatus | Whether to send notifications on your build's start and end. |
| Webhook | Whether to create a webhook that will trigger a build every time an event happens in the repository. |
| WebhookFilters | A list of webhook filters that can constraint what events in the repository will trigger a build. |
| WebhookTriggersBatchBuild | Trigger a batch build from a webhook instead of a standard one. |
Constructors
GitHubSourceProps()
Construction properties for GitHubSource and GitHubEnterpriseSource.
public GitHubSourceProps()
Examples
var gitHubSource = Source.GitHub(new GitHubSourceProps {
Owner = "aws",
WebhookTriggersBatchBuild = true, // optional, default is false
WebhookFilters = new [] { FilterGroup.InEventOf(EventAction.WORKFLOW_JOB_QUEUED).AndRepositoryNameIs("aws-.*").AndRepositoryNameIsNot("aws-cdk-lib") }
});
Properties
BranchOrRef
The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.
public string? BranchOrRef { get; set; }
Property Value
Examples
"mybranch";
BuildStatusContext
This parameter is used for the context parameter in the GitHub commit status.
public string? BuildStatusContext { get; set; }
Property Value
Examples
"My build #$CODEBUILD_BUILD_NUMBER";
BuildStatusUrl
The URL that the build will report back to the source provider.
public string? BuildStatusUrl { get; set; }
Property Value
Examples
"$CODEBUILD_PUBLIC_BUILD_URL";
CloneDepth
FetchSubmodules
Whether to fetch submodules while cloning git repo.
public bool? FetchSubmodules { get; set; }
Property Value
bool?
Identifier
Owner
The GitHub Organization/user that owns the repo.
public string Owner { get; set; }
Property Value
Examples
"awslabs";
Repo
The name of the repo (without the username).
public string? Repo { get; set; }
Property Value
Examples
"aws-cdk";
ReportBuildStatus
Whether to send notifications on your build's start and end.
public bool? ReportBuildStatus { get; set; }
Property Value
bool?
Webhook
Whether to create a webhook that will trigger a build every time an event happens in the repository.
public bool? Webhook { get; set; }
Property Value
bool?
WebhookFilters
A list of webhook filters that can constraint what events in the repository will trigger a build.
public FilterGroup[]? WebhookFilters { get; set; }
Property Value
WebhookTriggersBatchBuild
Trigger a batch build from a webhook instead of a standard one.
public bool? WebhookTriggersBatchBuild { get; set; }
Property Value
bool?