-
Notifications
You must be signed in to change notification settings - Fork 12
docs(contributing)!: clarify use of scopes and breaking changes #150
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: unstable
Are you sure you want to change the base?
docs(contributing)!: clarify use of scopes and breaking changes #150
Conversation
Hello, this PR improves the documentation on Conventional Commits by clarifying the use of scopes and breaking changes. Let me know if any adjustments are needed. Thanks! |
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.
Hey @dharapandya85 and thank you for the great effort! Documentation is one of the most overlooked things and CONTRIBUTING.md
has quite some problems. I left some comments inline, but you should also check:
- The commit message title, contains the breaking changes
!
indicator, which doesn't proceed - You should always add a commit message body
[UPDATES]:
- You can and should drop the second commit (the merge one)
- To better see the inline comments below, go into the
commits
tab and go commit by commit (in this case, the only one commit, not considering the merge)
CONTRIBUTING.md
Outdated
6. [Pull Request Guidelines](#pull-request-guidelines) | ||
7. [Issue Reporting](#issue-reporting) | ||
8. [Communication](#communication) | ||
3. [Development Cycle and Branches](#development-cycle-and-branches) |
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.
Same as the comment above. This change has merit, but it shouldn't go in this commit
CONTRIBUTING.md
Outdated
@@ -104,9 +104,20 @@ Commit contents, in other words, the changes the commit introduce should: | |||
- Not destabilize the compilation, so `cargo build` shouldn't fail. | |||
- Not fail in CI jobs. | |||
|
|||
### Use Conventional Commits | |||
## Use Conventional Commits |
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.
I don't think we should elevate this subsection to a section as it makes sense to keep it under the "Commit Guidelines" section
5. [Commit Guidelines](#commit-guidelines) | ||
6. [Pull Request Guidelines](#pull-request-guidelines) | ||
7. [Issue Reporting](#issue-reporting) | ||
8. [Communication](#communication) |
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.
Same as the comment above. This change has merit, but it shouldn't go in this commit
4. [Commit Guidelines](#commit-guidelines) | ||
5. [Pull Request Guidelines](#pull-request-guidelines) | ||
6. [Issue Reporting](#issue-reporting) | ||
7. [License](#license) |
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.
Same as the comment above. This change has merit, but it should go in this commit
5. [Pull Request Guidelines](#pull-request-guidelines) | ||
6. [Issue Reporting](#issue-reporting) | ||
7. [License](#license) | ||
|
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.
Also, no need for this extra line
CONTRIBUTING.md
Outdated
`patch-hub` follows the use of [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Commit message use the format: | ||
`<type>(<scope>)!: <description>` | ||
|
||
- `type`: kind of change (e.g., `feat`,`fix`,`docs`) | ||
- `scope`: optional module or section of the codebase | ||
- `!`: indicates a **breaking change** | ||
- `description`: short summary of the change | ||
|
||
Example: | ||
feat(foo)!: introduce breaking change bar | ||
|
||
`patch-hub` follows the use of [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) wherein you indicate the type of change you're making at the start with a label, followed by a scope (optional, since the project is still small), and then the commit message after a colon. | ||
For more, see [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) |
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.
969627c
to
48a609a
Compare
Thank you, @davidbtadokoro, for the review. I would like to clarify some doubts regarding: |
Hey @dharapandya85 and thanks for the feedback!
I don't know if I got this right, but you shouldn't change the table of contents in this PR, at least, not in the same commit where you are enforce the use of conventional commits. You could do:
About the commit message body, prefer not using bullet points like you did but something like "Because of do " (take note of the imperative mode like you did in the title). A good message on commit messages (not just for patch-hub) is this one.
This seems like a bug on GitHub, but if you go to the
is still there...
The form of breaking changes is like you've explained. I just raised the point that you've added the
Yes, correct the above in this same PR. Don't open another one 😅 Beyond that, don't forget to address the other two comments I did. Feel free to ping me if you have any more doubts! |
d8bfd39
to
24e6064
Compare
Thanks @davidbtadokoro! I have split the commits as suggested, removed the redundant line in CONTRIBUTING.md, removed the nonexistent sections, and corrected message formatting. Could you let me know if any corrections are needed? |
Hi @dharapandya85, and thanks for the update! You've made progress, but there are still things that need to be taken care of. This may sound weird if you never did it, but instead of adding more commits to your branch, you should always amend them and, if you have more than one commit, you should do a git rebase (this reference is really good for this stuff). The commit message should have a message body. What I said about the format of it, was that it isn't good to just write it in a checklist format, but you should always add a commit message body. Beyond that, you didn't address the comment about not elevating the subsection "Convention Commits" to a section (it should still be under commit guidelines). And, taking the opportunity, I don't feel the need to change "Development Workflow" to "Development Cycle and Branches" as this section is about much more than just that (development cycle is about releasing and workflow covers exactly what the section is described). Again, I am not trying to be snappy, but to show you the correct way to contribute to patch-hub, and, also, to most projects. Thanks for the effort and commitment! [UPDATE]: Forgot to reinforce that you should drop the merge commit you have in your branch |
4544429
to
8571767
Compare
Thanks @davidbtadokoro for the feedback. I have now added the body to the commit message, didn't change "Development Workflow" to "Development Cycles and Branches", made a subsection of "Conventional Commits" under " Commit Guidelines", as suggested, I amended the commit and rebased the branch. But I had initially dropped the commit message of "merge to unstable" during rebase, and I don't know why it is still visible. Please inform me if I missed anything or if any adjustments are needed for the branch. I would appreciate any further review. or guidance |
Hi @dharapandya85, thanks for the update and sorry for the delay. My bad if I am communicating badly, but this PR should only contain one commit that implements the change minimally, so you should drop all other commits, and don't have commits like the third and fourth that "revert" the first commit changes (e.g., making "Use Conventional Commits" a section again). I enforce the importance of you checking and reading about rewriting a branch through this reference. I know I keep hitting on this key, but knowing this stuff is essential to contributing (maybe I will make this a section on the guidelines). In any case, don't hesitate to ask questions. |
8571767
to
abbaecb
Compare
Thanks @davidbtadokoro for guidance. I have dropped the commits "enforcing conventional commits use" and "clarifying use of scopes". Please inform me of any other adjustments. Now, the PR has one clean commit. |
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.
Hey @dharapandya85, this last update is a progress! You got the point that we need only a single commit. The problems now are:
- There are merge conflict artifacts in the commit
- The commit itself doesn't clarify the use of scopes and the like (it only adds the mentioned conflict artifacts and repeats sections)
- The commit message still has the bullet points format, which, as I mentioned a few times, is not the style we prefer here in patch-hub
We are progressing, but, by now, we have had a lot of review cycles, and would really appreciate if you did things slowly and tried to really grasp the things I am proposing to you. I won't ever negate reviews or feedback; yet, I feel like I am having to keep repeating things I already said...
In short, don't need to rush! Take your time to really understand what I am communicating. Thanks for keeping the work!
CONTRIBUTING.md
Outdated
@@ -7,11 +7,19 @@ Thank you for your interest in contributing to `patch-hub`! This document outlin | |||
1. [Code of Conduct](#code-of-conduct) | |||
2. [Getting Started](#getting-started) | |||
3. [Development Workflow](#development-workflow) | |||
<<<<<<< HEAD |
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.
It seems you have pushed a commit with artifacts from a rebase
CONTRIBUTING.md
Outdated
4. [Coding Style](#coding-style) | ||
5. [Commit Guidelines](#commit-guidelines) | ||
6. [Pull Request Guidelines](#pull-request-guidelines) | ||
7. [Issue Reporting](#issue-reporting) | ||
8. [Communication](#communication) | ||
======= |
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.
Same here about a rebase artifact
CONTRIBUTING.md
Outdated
6. [Issue Reporting](#issue-reporting) | ||
7. [License](#license) | ||
|
||
>>>>>>> 8571767 (docs(contributing): clarify commit guidelines structure) |
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.
Same here about a rebase artifact
Update the example commits under the "Use Conventional Commits" section to demonstrate proper usage of scopes and how to indicate breaking changes with the `!` symbol. This improves clarity for contributors and aligns example with expected commit formatting. Signed-off-by: dharapandya85 <[email protected]>
b584e4c
to
1f7ae75
Compare
Thank you, @davidbtadokoro, for your efforts and feedback. Sorry for the trouble of reminding me again and again about the body of the commit message. As suggested:
|
This updates the "Use Conventional Commits" section to include the proper syntax for scope and breaking changes.
Changes:
<type>(<scope>)! : <description>
feat (foo)!: introduce breaking change bar
This provides clearer guidance for contributors writing commit messages.