Skip to content

ci: add commit & MR title linting with danger

Paul Gascou-Vaillancourt requested to merge 22-commitlint into master

What does this MR do?

This copies over the linting from GitLab, but with some adjustments:

  1. Remove emoji check, as we don't have the digests available
  2. Increase commit subject limit to 72 chars, as the semantic release types will increase our subject line length
  3. Remove 3-word-check for subject, as we are likely to hit more due to the semantic commit types
  4. Remove check whether subject starts with capital letter, as semantic commit types should be lowercase
  5. Add checks for proper semantic release commits and MR title

What does it look like? How can we test this before merging?

  • The present MR will not trigger a release because of the ci: type, hence Danger's report in the comments section: !622 (comment 198748773)
  • This dummy MR showcases a major (breaking) release: !848 (comment 231891118)
  • This other MR has Squash commits when merge request is accepted enabled and showcases a patch release based on its title: !850 (comment 232101339)

To test this, simply branch off 22-commitlint, add some commits, push your branch and check the danger-review job's output.

Closes #22 (closed), #196 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports