Skip to content

Commit 1bbe5cd

Browse files
authored
docs: remove GitLab clone depth limitation
See conventional-changelog#4103
1 parent 2eca565 commit 1bbe5cd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/guides/ci-setup.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,22 @@ workflows:
125125
## GitLab CI
126126
127127
```yaml
128-
stages: ['lint', 'build', 'test']
129128
lint:commit:
130129
image: registry.hub.docker.com/library/node:alpine
131130
stage: lint
131+
variables:
132+
GIT_DEPTH: 0
132133
before_script:
133134
- apk add --no-cache git
134135
- npm install --save-dev @commitlint/config-conventional @commitlint/cli
135136
script:
136137
- echo "${CI_COMMIT_MESSAGE}" | npx commitlint
137138
```
138139
140+
GitLab limits `git clone` depth to
141+
[20 commits by default](https://docs.gitlab.com/ee/ci/pipelines/settings.html#limit-the-number-of-changes-fetched-during-clone).
142+
Setting `GIT_DEPTH: 0` removes this limitation, so `commitlint` can check larger MRs.
143+
139144
## GitLab CI with pre-build container
140145

141146
```yaml
@@ -189,4 +194,4 @@ workflows:
189194

190195
> [!TIP]
191196
> Help yourself adopting a commit convention by using an interactive commit prompt.
192-
> Learn how to use `@commitlint/prompt-cli` in the [Use prompt guide](/> guides/use-prompt)
197+
> Learn how to use `@commitlint/prompt-cli` in the [Use prompt guide](/guides/use-prompt).

0 commit comments

Comments
 (0)