Skip to content
Snippets Groups Projects
Commitlint.yaml 571 B
Newer Older
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
commitlint:
  stage: lint
  image: "$COMMITLINT_IMAGE"
  variables:
    COMMITLINT_IMAGE: 'hub.eole.education/eole/commitlint:latest'
    # Set default commit hashes for `--from` and `--to`
    - 'export COMMITLINT_FROM="$(git merge-base origin/${CI_DEFAULT_BRANCH} HEAD)"'
    - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
    # Run `commitlint`
    - 'commitlint --from "${COMMITLINT_FROM}"
                  --to   "${COMMITLINT_TO}"
                  --verbose'
...