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

Properties of the Github repository for `Source.fromGitHub()`.

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

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

## Example

TypeScript:

```ts
new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromGitHub({
    repositoryUrl: 'https://github.com/aws-containers/hello-app-runner',
    branch: 'main',
    configurationSource: apprunner.ConfigurationSourceType.REPOSITORY,
    connection: apprunner.GitHubConnection.fromConnectionArn('CONNECTION_ARN'),
  }),
});
```

Python:

```python
apprunner.Service(self, "Service",
    source=apprunner.Source.from_git_hub(
        repository_url="https://github.com/aws-containers/hello-app-runner",
        branch="main",
        configuration_source=apprunner.ConfigurationSourceType.REPOSITORY,
        connection=apprunner.GitHubConnection.from_connection_arn("CONNECTION_ARN")
    )
)
```

Java:

```java
Service.Builder.create(this, "Service")
        .source(Source.fromGitHub(GithubRepositoryProps.builder()
                .repositoryUrl("https://github.com/aws-containers/hello-app-runner")
                .branch("main")
                .configurationSource(ConfigurationSourceType.REPOSITORY)
                .connection(GitHubConnection.fromConnectionArn("CONNECTION_ARN"))
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.AppRunner.Alpha
new Service(this, "Service", new ServiceProps {
    Source = Source.FromGitHub(new GithubRepositoryProps {
        RepositoryUrl = "https://github.com/aws-containers/hello-app-runner",
        Branch = "main",
        ConfigurationSource = ConfigurationSourceType.REPOSITORY,
        Connection = GitHubConnection.FromConnectionArn("CONNECTION_ARN")
    })
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2
apprunner.NewService(this, jsii.String("Service"), &ServiceProps{
	Source: apprunner.Source_FromGitHub(&GithubRepositoryProps{
		RepositoryUrl: jsii.String("https://github.com/aws-containers/hello-app-runner"),
		Branch: jsii.String("main"),
		ConfigurationSource: apprunner.ConfigurationSourceType_REPOSITORY,
		Connection: apprunner.GitHubConnection_FromConnectionArn(jsii.String("CONNECTION_ARN")),
	}),
})
```

## Properties

- `branch`: string = main — The branch name that represents a specific version for the repository.

- `codeConfigurationValues`: [CodeConfigurationValues](/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.CodeConfigurationValues.html) — The code configuration values.

  **Default:** no values will be passed. The `apprunner.yaml` from the github reopsitory will be used instead.

  Will be ignored if configurationSource is `REPOSITORY`.

- `configurationSource`: [ConfigurationSourceType](/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.ConfigurationSourceType.html) (required) — The source of the App Runner configuration.

- `connection`: [GitHubConnection](/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.GitHubConnection.html) (required) — ARN of the connection to Github.

  Only required for Github source.

- `repositoryUrl`: string (required) — The location of the repository that contains the source code.
