ci: Require conventional commits tag in PR titles #734
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of the CI improvements listed in #725.
Adds a check when a PR is opened or modified to ensure it's title contains a conventional commits tag, e.g.
When a PR introduces breaking changes (that will require a breaking semver bump) we also require a
BREAKING CHANGE: ...line in the PR body describing what the changes required in user code.When the check fails, the bot posts a help message indicating what needs to be fixed.
The list of valid tags are:
feat, fix, docs, style, refactor, perf, test, ci, chore, revert.rfcis an invalid tag with a custom error message, useful when opening draft PRs.I added a pull request template with these instructions.
The main goal of this requirement is to automate changelog generation with release-plz. The tags get grouped into categories in the changelog, and breaking changes are automatically picked when deciding the version bump.
This also integrates with the semver checks added in #692. The check fails on PRs with breaking changes unless they are marked as breaking in title.
The code here is based on the reusable workflow I implemented in CQCL/hugrverse-actions.