ci: add commit & MR title linting with danger
What does this MR do?
This copies over the linting from GitLab, but with some adjustments:
- Remove emoji check, as we don't have the digests available
- Increase commit subject limit to 72 chars, as the semantic release types will increase our subject line length
- Remove 3-word-check for subject, as we are likely to hit more due to the semantic commit types
- Remove check whether subject starts with capital letter, as semantic commit types should be lowercase
- 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