# BitBucketSourceProps

Construction properties for `BitBucketSource`.

Extends: BitBucketSourceProps
Extends: SourceProps

- Source: [`aws-codebuild/lib/source.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codebuild/lib/source.ts#L875)
- Type last changed: v2.21.0 · 22 Apr 2022

## Example

```ts
const bbSource = codebuild.Source.bitBucket({
  owner: 'owner',
  repo: 'repo',
});
```

## Properties

- `branchOrRef`: string — The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

  **Default:** the default branch's HEAD commit ID is used

  ```ts
  'mybranch'
  ```

- `buildStatusName`: string — This parameter is used for the `name` parameter in the Bitbucket commit status.

  **Default:** "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)"

  Can use built-in CodeBuild variables, like $AWS_REGION.

  ```ts
  "My build #$CODEBUILD_BUILD_NUMBER"
  ```

- `buildStatusUrl`: string — The URL that the build will report back to the source provider.

  **Default:** link to the AWS Console for CodeBuild to a particular build execution

  Can use built-in CodeBuild variables, like $AWS_REGION.

  ```ts
  "$CODEBUILD_PUBLIC_BUILD_URL"
  ```

- `cloneDepth`: number — The depth of history to download.

  Minimum value is 0.
  If this value is 0, greater than 25, or not provided,
  then the full history is downloaded with each build of the project.

- `fetchSubmodules`: boolean = false — Whether to fetch submodules while cloning git repo.

- `identifier`: string — The source identifier.

  This property is required on secondary sources.

- `owner`: string (required) — The BitBucket account/user that owns the repo.

  ```ts
  'awslabs'
  ```

- `repo`: string (required) — The name of the repo (without the username).

  ```ts
  'aws-cdk'
  ```

- `reportBuildStatus`: boolean = true — Whether to send notifications on your build's start and end.

- `webhook`: boolean — Whether to create a webhook that will trigger a build every time an event happens in the repository.

  **Default:** true if any `webhookFilters` were provided, false otherwise

- `webhookFilters`: [FilterGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.FilterGroup.html)[] — A list of webhook filters that can constraint what events in the repository will trigger a build.

  **Default:** every push and every Pull Request (create or update) triggers a build

  A build is triggered if any of the provided filter groups match.
  Only valid if `webhook` was not provided as false.

- `webhookTriggersBatchBuild`: boolean = false — Trigger a batch build from a webhook instead of a standard one.

  Enabling this will enable batch builds on the CodeBuild project.
