Interface GitHubSourceOptions

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.830Z") @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

    • 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