chore: keep CI-only commits out of the changelog - #1931
Conversation
| interval: "daily" | ||
| cooldown: | ||
| default-days: 7 | ||
| # Prefix GHA bumps as ci(deps): so release-plz can skip them (#1898). |
There was a problem hiding this comment.
No need to include issue number here
There was a problem hiding this comment.
Dropped the issue number from the Dependabot comment. Prefix is still ci / ci(deps):.
| { message = "^changed", group = "changed" }, | ||
| { message = "^deprecated", group = "deprecated" }, | ||
| { message = "^removed", group = "removed" }, | ||
| { message = "^fix", group = "fixed" }, |
There was a problem hiding this comment.
This will match "fixup! " commits generated by git commit --fixup, which is probably undesirable.
There was a problem hiding this comment.
Good catch — narrowed ^fix to ^fix(?:\(.*\))?: so fixup! from git commit --fixup is no longer grouped as “fixed”. No ^fixup! skip parser.
| @@ -0,0 +1,17 @@ | |||
| # Changelog generation for release-plz / git-cliff. | |||
| # CI-only commits are excluded from the user-facing changelog (#1898). | |||
There was a problem hiding this comment.
Please exclude the issue number from the changes.
There was a problem hiding this comment.
done, issue number is out of that comment
NobodyXu
left a comment
There was a problem hiding this comment.
Thank you! One nit feedback in additional to xtqqczze's feedback
| interval: "daily" | ||
| cooldown: | ||
| default-days: 7 | ||
| # Prefix GHA bumps as `ci(deps):` so release-plz can skip them. |
There was a problem hiding this comment.
Might be unnecessary to mention release-plz here. We probably want this commit convention anyway.
There was a problem hiding this comment.
fine by me, dropped the release-plz mention
| interval: "daily" | ||
| cooldown: | ||
| default-days: 7 | ||
| # Prefix GHA bumps as `ci(deps):` so they follow the repo commit convention. |
There was a problem hiding this comment.
This seems tautological, just remove the comment?
|
@NobodyXu Comparing the changelog for v1.4.7 with the auto-generated changelog shown in #1928, there are quite a few commits that would not be excluded correctly. If we want this to work reliably, we’ll need to follow the Conventional Commits format going forward. It might therefore be worth having a separate PR to document this in |
| # Match target-info / windows-sys regeneration first so later skip rules | ||
| # do not hide those user-facing commits. Then skip CI, chore, and refactor. | ||
| commit_parsers = [ | ||
| { message = "(?i)^(?:(?:chore|refactor)(?:\\(.*\\))?: )?regenerat(?:e|ion).*(?:target.?info|windows.?sys)", group = "other" }, |
There was a problem hiding this comment.
I think this is overfitting, we don't have any commits that would match the chore: regenerat case.
There was a problem hiding this comment.
fair, dropped that regenerat exception
|
@NobodyXu As a follow-up, we may want to document in CONTRIBUTING.md that we follow Conventional Commits and add a check to CI to enforce this, what do you think? |
There was a problem hiding this comment.
can we tweak this like the others
There was a problem hiding this comment.
tweaked, feat and security now use the same scoped pattern
| # Skip CI, chore, and refactor conventional subjects. | ||
| commit_parsers = [ | ||
| { message = "^ci(?:\\(.*\\))?:", skip = true }, | ||
| { message = "^chore\\(deps\\): bump ", skip = true }, |
There was a problem hiding this comment.
this one is now redundant, no?
There was a problem hiding this comment.
yep, redundant under the broad chore skip, removed
xtqqczze
left a comment
There was a problem hiding this comment.
Looks fine to me; this can always be tweaked later. Could you please rebase this to a clean history of commits?
Skip conventional ci/chore/refactor subjects in release-plz.toml commit parsers. Prefix Dependabot GitHub Actions updates as `ci(deps):`.
dfff5eb to
21faed6
Compare
|
thanks, rebased to a single clean commit on latest main |
That's a good idea, especially on the generated files and changelog, to remind people they don't have to manually write changelog |
|
@NobodyXu This might require a change in merge strategy, looks like a squash merge is used currently? |
|
Yes we currently use squash merge for a clean history |
Summary
Configure release-plz changelog parsers to skip CI-only subjects (
ci:,ci(…):) and Dependabot Actions bumps (chore(deps): bump …). Point Dependabot Actions commits atci(deps):so they hit the same skip.User-facing
chore:and crate dep updates still land in the changelog.Fixes #1898
Test plan
tombi format --check release-plz.toml