-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Considering enforcing conventional commit specification #4891
Comments
I thought it is not the commit message but the pull request title, that github is using to describe the changes?! Maybe a workflow which checks the title of the pull request? |
It is, but the PR title is usually generated from the first commit message (unless there's multiple commits in the PR); see Fdawgs/fastify-disablecache#228 |
to be honest, i personally dont like commit message linting. It is quiet annoying to get it right. Also you need it for the first commit only, but you would be forced to do it on every follow up commit. We could fork something like https://github.com/deepakputhraya/action-pr-title and modify it for our needs |
That looks a lot better! And you're right, the PRs are all squashed anyway, so it's only the PR title that matters. |
I will fork and modify the action. |
I loathe conventional commit. It was a source of constant frustration at my last gig. |
+1 on the suggestion, as well on the thoughts from @Uzlopak about having a GHA instead of a git hook that validates that. |
I think we should validate the PR title, not the individual commit. That's what ends up in the release notes anyway. |
check this: I modified the action for our needs imho: edit the pull request title to something without the prefix chore, fix or feature, and it fails. change it to match the prefix and it gets green. I assume, that by modifying the dependabot commit-message we can prefix it with chore. I dont know if the automerge fails, because it maybe doesnt realize it is dependabot. Should be investigated. |
You can configure dependabot to prefix the commit title. Although, I've never needed to configure it this way, most of the time it just works like this.
We should also communicate this within the |
I am with @jsumners on this one. I hate commit message rules. They are just annoying. And when we squash merge we potentially cant validate them. |
I try to add the right label to the PR every time. I would add an action that:
so, the squash&merge operation will be smooth and easy |
The markdown linter is already a pain - I would not add more stress to contributors IMHO |
It is not clear how to solve that. If I add a label What if I add the label |
To reduce the burden of new contributor, we can actually do the job ourselves. |
What is the problem with reading the details of items that stand out to you by clicking to the linked issue/pr?
Are such labels guaranteed to be accurate? Hint: nope. Note that Node core doesn't bother with this arbitrary labeling either https://github.com/nodejs/node/blob/8a725c7d026b8d12b1fae597e93f90367c1da2fa/doc/changelogs/CHANGELOG_V18.md#commits-1 |
Well I created that action https://github.com/fastify/action-pr-title in fastify org. Do we want to use it, or should I delete the repo, before somebody external wants to use it for its non-fastify-org repo :D... |
let's try it, we can always drop it. Would you mind setting it up in this repo? |
Thanks @Uzlopak, sorry been a tad busy with work so haven't had a chance to revisit this recently. |
We have had a couple of releases with this enforced. Is it bringing any value? |
yes, it does and the release message is slightly better IMHO: with: https://github.com/fastify/fastify/releases/tag/v4.25.0 |
@Eomm in your view, what is the improvement between those two? |
Prerequisites
Issue
Whilst the release notes are great at showing what changed and who committed what, the individual items are a mixed bag, and make it difficult to skim read.
As an example from v4.19.0:
From a glance, I can't tell what that
pluginName will be exposed in FastifyInstance
change is. Is it a bugfix? Is it a new feature? Was it just the documentation that was updated? The other two items in the list I can clearly see what type of change they were.I think this could be remedied by enforcing the use of the conventional commit specification using the Angular convention with commitlint in a husky hook and/or the commitlint GH Action.
The text was updated successfully, but these errors were encountered: