Skip to content
v2.274.0

Experimental

@aws-cdk/aws-amplify-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

GitHubSourceCodeProviderProps Struct ​

Properties for a GitHub source code provider.

Example ​

ts
const amplifyApp = new amplify.App(this, 'App', {
  sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
    owner: '<user>',
    repository: '<repo>',
    oauthToken: SecretValue.secretsManager('my-github-token'),
  }),
  customResponseHeaders: [
    {
      pattern: '*.json',
      headers: {
        'custom-header-name-1': 'custom-header-value-1',
        'custom-header-name-2': 'custom-header-value-2',
      },
    },
    {
      pattern: '/path/*',
      headers: {
        'custom-header-name-1': 'custom-header-value-2',
      },
    },
  ],
});

Properties ​

oauthTokenSecretValueoauth_tokenSecretValueoauthTokenSecretValueOauthTokenSecretValueOauthTokenSecretValuerequired#
A personal access token with the `repo` scope.
ownerstringownerstrownerStringOwnerstringOwner*stringrequired#
The user or organization owning the repository.
repositorystringrepositorystrrepositoryStringRepositorystringRepository*stringrequired#
The name of the repository.