Interface GitHubSourceActionProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:48.442Z") @Stability(Stable) public interface GitHubSourceActionProps extends, CommonActionProps
Construction properties of the GitHub source action.


 Artifact sourceOutput;
 PipelineProject project;
 GitHubSourceAction sourceAction = GitHubSourceAction.Builder.create()
 // later:
 // later:
                 "COMMIT_URL", BuildEnvironmentVariable.builder()
  • Method Details

    • getOauthToken

      @Stability(Stable) @NotNull SecretValue getOauthToken()
      A GitHub OAuth token to use for authentication.

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

      const oauth = cdk.SecretValue.secretsManager('my-github-token'); new GitHubSource(this, 'GitHubAction', { oauthToken: oauth, ... });

      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)

      See Also:
    • getOutput

      @Stability(Stable) @NotNull Artifact getOutput()
    • getOwner

      @Stability(Stable) @NotNull String getOwner()
      The GitHub account/user that owns the repo.
    • getRepo

      @Stability(Stable) @NotNull String getRepo()
      The name of the repo, without the username.
    • getBranch

      @Stability(Stable) @Nullable default String getBranch()
      The branch to use.

      Default: "master"

    • 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 GitHubSourceActionProps.Builder builder()
      a GitHubSourceActionProps.Builder of GitHubSourceActionProps