summaryrefslogtreecommitdiff
path: root/.gitlab-ci/commit-rules.yml
blob: fbd78a35da87b7e562b55a80808f3d5f1fc7acc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
patterns:
  require:
    - regex: '^[^:]+: +[^ ]'
      message: "Commit message subject must have a prefix. E.g. 'tests: '"
  deny:
    - regex: '^$CI_MERGE_REQUEST_PROJECT_URL/(-/)?merge_requests/$CI_MERGE_REQUEST_IID$'
      message: "Commit message must not contain a link to its own merge request"
    - regex: '^[^:]+: [a-z]'
      message: "Commit message subject should be properly Capitalized. E.g.  'cli: Fix help subcommand'"
      where: subject
    - regex: '^\S*\.[ch]:'
      message: Commit message subject prefix should not include .c, .h, etc.
      where: subject