> **Experimental**
>
> `@aws-cdk/aws-codestar-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# GitHubRepositoryProps

Construction properties of `GitHubRepository`.

Used as props by: [GitHubRepository](/cdk/api/v2/docs/@aws-cdk_aws-codestar-alpha.GitHubRepository.html)

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/github-repository.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-codestar-alpha/lib/github-repository.ts#L26)

## Example

TypeScript:

```ts
import * as codestar from '@aws-cdk/aws-codestar-alpha';
import * as s3 from 'aws-cdk-lib/aws-s3'

new codestar.GitHubRepository(this, 'GitHubRepo', {
  owner: 'aws',
  repositoryName: 'aws-cdk',
  accessToken: SecretValue.secretsManager('my-github-token', {
    jsonField: 'token',
  }),
  contentsBucket: s3.Bucket.fromBucketName(this, 'Bucket', 'amzn-s3-demo-bucket'),
  contentsKey: 'import.zip',
});
```

Python:

```python
import aws_cdk.aws_codestar_alpha as codestar
import aws_cdk.aws_s3 as s3

codestar.GitHubRepository(self, "GitHubRepo",
    owner="aws",
    repository_name="aws-cdk",
    access_token=SecretValue.secrets_manager("my-github-token",
        json_field="token"
    ),
    contents_bucket=s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"),
    contents_key="import.zip"
)
```

Java:

```java
import software.amazon.awscdk.services.codestar.alpha.*;
import software.amazon.awscdk.services.s3.*;

GitHubRepository.Builder.create(this, "GitHubRepo")
        .owner("aws")
        .repositoryName("aws-cdk")
        .accessToken(SecretValue.secretsManager("my-github-token", SecretsManagerSecretOptions.builder()
                .jsonField("token")
                .build()))
        .contentsBucket(Bucket.fromBucketName(this, "Bucket", "amzn-s3-demo-bucket"))
        .contentsKey("import.zip")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.CodeStar.Alpha
using Amazon.CDK.AWS.Codestar.Alpha;
using Amazon.CDK.AWS.S3;

new GitHubRepository(this, "GitHubRepo", new GitHubRepositoryProps {
    Owner = "aws",
    RepositoryName = "aws-cdk",
    AccessToken = SecretValue.SecretsManager("my-github-token", new SecretsManagerSecretOptions {
        JsonField = "token"
    }),
    ContentsBucket = Bucket.FromBucketName(this, "Bucket", "amzn-s3-demo-bucket"),
    ContentsKey = "import.zip"
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkcodestaralpha/v2
import codestar "github.com/aws/aws-cdk-go/awscdkcodestaralpha"
import s3 "github.com/aws/aws-cdk-go/awscdk"

codestar.NewGitHubRepository(this, jsii.String("GitHubRepo"), &GitHubRepositoryProps{
	Owner: jsii.String("aws"),
	RepositoryName: jsii.String("aws-cdk"),
	AccessToken: awscdk.SecretValue_SecretsManager(jsii.String("my-github-token"), &SecretsManagerSecretOptions{
		JsonField: jsii.String("token"),
	}),
	ContentsBucket: s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")),
	ContentsKey: jsii.String("import.zip"),
})
```

## Properties

- `accessToken`: [SecretValue](/cdk/api/v2/docs/aws-cdk-lib.SecretValue.html) (required) — The GitHub user's personal access token for the GitHub repository.

- `contentsBucket`: [IBucketRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_s3.IBucketRef.html) (required) — The name of the Amazon S3 bucket that contains the ZIP file with the content to be committed to the new repository.

- `contentsKey`: string (required) — The S3 object key or file name for the ZIP file.

- `contentsS3Version`: string — The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.

  **Default:** not specified

- `description`: string — A comment or description about the new repository.

  **Default:** no description

  This description is displayed in GitHub after the repository
  is created.

- `enableIssues`: boolean = true — Indicates whether to enable issues for the GitHub repository.

  You can use GitHub issues to track information
  and bugs for your repository.

- `owner`: string (required) — The GitHub user name for the owner of the GitHub repository to be created.

  If this
  repository should be owned by a GitHub organization, provide its name

- `repositoryName`: string (required) — The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.

- `visibility`: [RepositoryVisibility](/cdk/api/v2/docs/@aws-cdk_aws-codestar-alpha.RepositoryVisibility.html) = RepositoryVisibility.PUBLIC — Indicates whether the GitHub repository is a private repository.

  If so, you choose who can see and commit to
  this repository.
