Interface GitHubSourceOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GitHubSourceOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:19.445Z") @Stability(Stable) public interface GitHubSourceOptions extends software.amazon.jsii.JsiiSerializable
Options for GitHub sources.

Example:

 CodePipelineSource.gitHub("org/repo", "branch", GitHubSourceOptions.builder()
         // This is optional
         .authentication(SecretValue.secretsManager("my-token"))
         .build());
 
  • Method Details

    • getActionName

      @Stability(Stable) @Nullable default String getActionName()
      The action name used for this source in the CodePipeline.

      Default: - The repository string

    • getAuthentication

      @Stability(Stable) @Nullable default SecretValue getAuthentication()
      A GitHub OAuth token to use for authentication.

      It is recommended to use a Secrets Manager Secret to obtain the token:

       SecretValue oauth = SecretValue.secretsManager("my-github-token");
       

      The GitHub Personal Access Token should have these scopes:

      • repo - to read the repository
      • admin:repo_hook - if you plan to use webhooks (true by default)

      Default: - SecretValue.secretsManager('github-token')

      See Also:
    • getTrigger

      @Stability(Stable) @Nullable default GitHubTrigger getTrigger()
      How AWS CodePipeline should be triggered.

      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

    • builder

      @Stability(Stable) static GitHubSourceOptions.Builder builder()
      Returns:
      a GitHubSourceOptions.Builder of GitHubSourceOptions