ci: Require conventional commits tag in PR titles#734
Merged
Conversation
This was referenced Feb 7, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 19, 2025
#734 added a CI check for conventional commit PR titles. However, I wrote `main` instead of `master` as target branch for the trigger -.-' This fix won't be applied until after merging the PR, since the `pull_request_target` trigger uses the workflow definition in the target branch.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 5, 2025
…ion (#735) Setups [`release-plz`](https://release-plz.dev/) to run on each push to `master`. This has two different flows: ### Release PR (disabled until after the `0.8.0` release) When a PR is merged, it analyses all the commits since the last release and creates a draft PR with the automatically generated changelog. Commits are grouped into categories using conventional commit tags (see #734). I ported the existing `RELEASES.rst` to markdown, so updates can be done from there. It also runs [`cargo-semver-checks`](https://crates.io/crates/cargo-semver-checks) to decide if the next release should be a semver-breaking bump, and updates the package version. Any merged PR marked as breaking (#734) will also cause a breaking version bump. ### Package publication When a change is merged that bumps the package version `release-plz` will create a new github release with the appropriate changelog and a list of contributors, and push the new version to crates.io. (I haven't yet added the crates token, will do once we verify this action is correctly configured, before the new release gets merged). drive-by: cherry-pick new clippy lint fixes from #753 --------- Co-authored-by: starovoid <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 5, 2025
This will enable automatic release PR generation by `release-plz`. This includes a semver-checks run to ensure that no breaking checks get released in a minor version bump, and CHANGELOG generation based on the commits merged since the last release, grouped by their conventional commits tag (#734). PRs marked as breaking (by adding a `!` after the tag) will be marked as so in the CHANGELOG, and they will force a major version bump. It is possible to modify the created PR before merging as needed; either to reword parts of the changelog or to override the version bump.
This was referenced Apr 5, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.