Interface IGitHubSourceOptions
Options for GitHub sources.
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGitHubSourceOptions
Syntax (vb)
Public Interface IGitHubSourceOptions
Remarks
ExampleMetadata: infused
Examples
CodePipelineSource.GitHub("org/repo", "branch", new GitHubSourceOptions {
// This is optional
Authentication = SecretValue.SecretsManager("my-token")
});
Synopsis
Properties
Action |
The action name used for this source in the CodePipeline. |
Authentication | A GitHub OAuth token to use for authentication. |
Trigger | How AWS CodePipeline should be triggered. |
Properties
ActionName
The action name used for this source in the CodePipeline.
virtual string ActionName { get; }
Property Value
System.
Remarks
Default: - The repository string
Authentication
A GitHub OAuth token to use for authentication.
virtual SecretValue Authentication { get; }
Property Value
Remarks
It is recommended to use a Secrets Manager Secret
to obtain the token:
var oauth = SecretValue.SecretsManager("my-github-token");
The GitHub Personal Access Token should have these scopes:
Default: - SecretValue.secretsManager('github-token')
See: https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-create-personal-token-CLI.html
Trigger
How AWS CodePipeline should be triggered.
virtual Nullable<GitHubTrigger> Trigger { get; }
Property Value
System.
Remarks
With the default value "WEBHOOK", a webhook is created in GitHub that triggers the action. With "POLL", CodePipeline periodically checks the source for changes. With "None", the action is not triggered through changes in the source.
To use WEBHOOK
, your GitHub Personal Access Token should have
admin:repo_hook scope (in addition to the regular repo scope).
Default: GitHubTrigger.WEBHOOK