-
Notifications
You must be signed in to change notification settings - Fork 1.5k
doc: Update the CONTRIBUTING.md to follow Conventional Commits #16823
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
base: master
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need "!" mark before ":" in the git commit topic for breaking changes as stated by [1]. Otherwise we are hiding breaking changes and this is not the goal, these should be clearly visible.
@cederom the issues are those I submitted to the mailing list:
It is not mandatory: please see items 12 and 13 of specification. If "!" is included in the commit title the "BREAKING CHANGE: " in the foot are not required. Just it! :-) |
I am for placing both "!:" in the git commit title and "BREAKING CHANGE" mark in the git commit body. "!:" is not self-explanatory, but if someone sees two git commits in the logs with both "!:" and "BREAKING CHANGE" they will quickly associate. We cannot hide breaking changes, these must be clearly exposed and easy to find. People with broken code will search for 1. git log, 2. changelog based on PR titles, so both git commits and PR titles should follow. This "BREAKING CHANGE: blah blah" part in the footer with description is a bit awkward because upper part of commit message already contains description what was changed and why. Thus only BREAKING CHANGE mark seems necessary if someone git --grep based on "!:" or "BREAKING" string and if someone does not yet know what the "!" in topic means. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for proposing updates to CONTRIBUTING.md. I need to think about this for a while before I can form an opinion...
@cederom the commit message normally says what was done, the message after "BREAKING CHANGE: " will give a hint to user how a feature was used in the past and how it is used now. The breaking features is not supposed to be hidden, but they we don't need to be in the title :) |
Could you modify the git commit message template file in this repository to also remind contributors at commit time to mark the breaking change?
|
Update from the mailing list: @jerpelea proposes to use I like the idea best as it is most versatile no matter what comes after, costs only single char, and its easy to parse. But it does not fully align with Conventional Commits spec.. and so we may propose that idea over there? :-) I also agree that "BREAKING CHANGE" should be put somewhere in the git commit message and PR description, just in case someone does not know what the "!" means, or parses logs by "BREAKING" string. If we want to put this in the footer as Conventional Commits declares, then a short sentence on how to fix should follow (i.e. BREAKING CHANGE: lvgl api changed from 8 to 9, update your code.). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you modify the git commit message template file in this repository to also remind contributors at commit time to mark the breaking change?
.gitmessage
Following this convention will let NuttX commits to be easily parsed by standard tools: https://www.conventionalcommits.org/en/v1.0.0/ Signed-off-by: Alan C. Assis <acassis@gmail.com>
@acassis how Release Notes are generated? These are generated from Pull Requests right? Thus we need this mark both in git commit and pull request. I am asking for this like 20 times already :D Thus my proposition for the point 9:
|
@cederom @linguini1 please re-review and remove the change request |
@jerpelea can you please explain, looks like I cannot :-) |
hi @cederom If I'm not mistaken, @jerpelea uses this tool in Python. https://github.com/apache/nuttx/blob/master/tools/doreleasenotes.py |
If you want to remove breaking mark ("!") from PR titles and leave only in git commits then I will follow the community voice. Should we vote that change on the mailing list? |
Nobody is proposing it Tomek! The exclamation mark will be needed by the Release Notes script... Could you please look at the code Luke! https://github.com/apache/nuttx/pull/16823/files |
Release Notes are generated from Pull Requests not git commits:
This "!" (+"BREAKING CHANGE:") mark should be both part of Git Commit and the Pull Request too as this tells more attention needed here when checking, and it aligns with existing release process as explained above. This is my last message about this. Let @jerpelea decide he is the Release Manager :-) |
@cederom a PR could contains more than one commit, and more than one commit can break different things. Currently we don't track Break Changes, so the script will need to be updated anyway. Then we modify it to detect breaks on commit instead of PR BTW, looking at https://github.com/apache/nuttx/blob/master/tools/doreleasenotes.py seems like it go by commits, not PR |
@linguini1 please review, I already fixed the suggest. @cederom please review and remove Change Request since the modification as implemented as suggested and adding it to PR too as you later suggested is redundant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Alan,
I think that the proposed changes should be discussed in the mailing list and voted by the community since they impacts the release process.
- Our release notes are generated from PR messages and without an indication that there is a breaking change we will create issues for our users.
- Breaking change PR should not contain more than 1 commit that breaks the compatibility and that commit MUST have the same mark in the commit title for easy identification.
Ok @jerpelea, let us to discuss there, but I think there is no way to prevent people to create a PR with more than one commit. And some cases it is necessary to have more than one commit to avoid compilation errors (when you modify and driver and need to modify the board files). You cannot include the board modifications in the driver commit and you cannot separate it in a new PR otherwise the driver PR will break the board building. |
Summary
Following this convention will let NuttX commits to be easily parsed by standard tools: https://www.conventionalcommits.org/en/v1.0.0/
Impact
Avoids using "[BREAKING]" in the commit title table sends a bad message for anyone reading the git history, also avoid cluttering the title, specially when more tags are used, since the title should be restricted to 50 chars.
Testing
N/A