Skip to content

Commit adc2e47

Browse files
docs: add bitbucket to ci-setup guide (#4147)
1 parent aacc345 commit adc2e47

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/guides/ci-setup.md

+19
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,25 @@ spec:
178178
timeout: 15m
179179
```
180180

181+
## BitBucket
182+
183+
Validate commits within a PR by leveraging [BitBucket`s default variables](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/):
184+
185+
```yml
186+
image: node:18
187+
188+
pipelines:
189+
pull-requests:
190+
default:
191+
- step:
192+
name: Lint commit messages
193+
script:
194+
- npm install --save-dev @commitlint/config-conventional @commitlint/cli
195+
- npx commitlint --from $BITBUCKET_COMMIT~$(git rev-list --count $BITBUCKET_BRANCH ^origin/$BITBUCKET_PR_DESTINATION_BRANCH) --to $BITBUCKET_COMMIT --verbose
196+
```
197+
198+
BitBucket limits git clone depth to 20 commits by default. You can change this behaviour by [changing the `clone` option](https://support.atlassian.com/bitbucket-cloud/docs/git-clone-behavior/).
199+
181200
### 3rd party integrations
182201

183202
#### [Codemagic](https://codemagic.io/)

0 commit comments

Comments
 (0)