Skip to content
Snippets Groups Projects
Commit ab76131e authored by Daniel Dehennin's avatar Daniel Dehennin
Browse files

Merge branch 'fix/commitlint-against-default-branch' into 'master'

ci(commitlint): master is not always the repository default branch

See merge request !6
parents 55c12b64 48b9f29c
No related branches found
No related tags found
1 merge request!6ci(commitlint): master is not always the repository default branch
Pipeline #6683 passed
...@@ -14,7 +14,7 @@ commitlint: ...@@ -14,7 +14,7 @@ commitlint:
- "git remote remove upstream" - "git remote remove upstream"
script: script:
# Set default commit hashes for `--from` and `--to` # Set default commit hashes for `--from` and `--to`
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"' - 'export COMMITLINT_FROM="$(git merge-base upstream/${CI_DEFAULT_BRANCH} HEAD)"'
- 'export COMMITLINT_TO="${CI_COMMIT_SHA}"' - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
# Run `commitlint` # Run `commitlint`
- 'commitlint --from "${COMMITLINT_FROM}" - 'commitlint --from "${COMMITLINT_FROM}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment