CondeNast / conventional-pull-request-action

Lint pull requests with the conventional commit spec, for a clean and conventional commit history
Apache License 2.0
15 stars 9 forks source link

fix: use config-conventional parserOpts #14

Closed mattbedell closed 3 years ago

mattbedell commented 3 years ago

12

Previously we were using theconfig-conventional rule set (rules only) to lint within our action, excluding additional settings like parserPreset. Simply extending the config how you would in a local commitlint.config.js does not seem possible as the parserPreset and possibly some other config requires resolution before it is usable, which does not work inside a Github action out of the box.

For this reason, the parserPreset used in config-conventional settings was excluded, but this caused certain commit messages to fail even if they met the conventional commit spec, ex : commit message feat!: exclamation indicates breaking change was failing.

This change grabs the same parserOpts provided by the parserPreset included with the config-conventional package. Doing it this way is a little inelegant, so if a cleaner way to include the parserOpts is possible, we should investigate.

Please complete these steps before requesting code review: