gromero commented on code in PR #88:
URL: https://github.com/apache/tvm-rfcs/pull/88#discussion_r946250351


##########
rfcs/0088-commit-message-guideline.md:
##########
@@ -0,0 +1,181 @@
+- Feature Name: Commit Message Guideline
+- Start Date: 2022-08-12
+- RFC PR: [apache/tvm-rfcs#0000](https://github.com/apache/tvm-rfcs/pull/88)
+- GitHub Issue: [apache/tvm#0000](https://github.com/apache/tvm/issues/0000)
+
+# Summary
+[summary]: #summary
+
+This RFC proposes adding a Commmit Message Guideline to TVM documentation to
+help guide contributors on how to write good commit messages when submitting
+code / PRs (Pull Requests) to Apache TVM.
+
+# Motivation
+[motivation]: #motivation
+
+Currently TVM commit logs are less than ideal because many commit messages lack
+valuable information and don't follow any format standard.
+
+Valuable information is usually left behind in Github PR conversations or
+discussion threads in the Discuss forum, making it hard to retrieve them when
+inspecting the commit messages -- using `git log`, for instance.
+
+Because commit messages are an indirect but important aspect of code quality,
+and also important for code maintenance, it is essential for a long term open
+source project to ensure that they meet high standards.
+
+The importance of commit messages conveying enough context and information 
about
+the code being changed will grow as the project grows and bad (poorly written)
+commit messages can affect negatively the code quality of future changes that
+would otherwise benefit from past good commit messages if they existed.
+
+Beyond code itself, poorly written commit messages can also affect the 
community
+in other ways. For example, by not providing to new contributors a consistent
+and complete history or context for the code changes, it can work as a barrier
+for new contributions because much more time will be necessary trying to
+understand what motivated a past critical but unclear change.
+
+Hence this Commit Message Guideline can help contributors to write good commit
+messages and so improve the current situation regarding the TVM commit logs.
+
+# Guide-level explanation
+[guide-level-explanation]: #guide-level-explanation
+
+Commit Message Guideline
+
+Apache TVM uses the Github (GH) platform for patch submission and code review
+via Pull Requests (PRs). The final commit (title and body) that is merged into
+the Apache TVM main tree is composed of the PR's title and body and must be 
kept
+updated and reflecting the new changes in the code as per the reviews and
+discussions.
+
+Although these guidelines apply essentially to the PRs’ title and body 
messages,
+because GH auto-generates the PR’s title and body from the commits on a given
+branch, it’s recommended to follow these guidelines right from the beginning,
+when preparing commits in general to be submitted to the Apache TVM project.
+This will ease the creation of a new PR, avoiding rework, and also will help 
the
+review.
+
+The rules below will help to achieve uniformity that has several benefits, both
+for review and for the code base maintenance as a whole, helping you to write
+commit messages with a good quality suitable for the Apache TVM project,
+allowing fast log searches, bisecting, and so on.
+
+_PR/commit title_:
+
+* Guarantee a title exists (enforced);
+* Don’t use Github usernames in the title, like @username (enforced);
+* Check if a tag should be present as a hint about what component(s) of the 
code
+  the commits “touch”. For example [BugFix], [CI], [microTVM], and [TVMC]. Tags
+  go between square brackets and appear first in the title. Tags help reviewers
+  to identify the PRs they can/want to review and also help the release folks
+  when generating the release notes (enforced);
+* Use an imperative mood. Avoid titles like “Added operator X” and “Updated
+  image Y in the CI”, instead use the forms “Add feature X” and “Update image Y
+  in the CI” instead;
+* Observe proper use of caps at the beginning (uppercase for the first letter)
+  and for acronyms, like, for instance, TVM, FVP, OpenCL. Hence instead of
+  “fix tvm use of opencl library”, write it as “Fix TVM use of OpenCL library”;
+* No period at the end of the title is necessary.
+
+_PR/commit body_:
+
+* Guarantee a body exists (enforced);
+* Don’t use Github usernames in body text, like @username (enforced);
+* Avoid “bullet” commit message bodies: “bullet” commit message bodies are not
+  bad per se, but “bullet” commit messages without any description or
+  explanation is likely as bad as commits without any description, rationale,
+  or explanation in the body.
+
+For minor deviations from these guidelines, the community will normally favor
+reminding the contributor of this policy over reverting or blocking a commmit /
+PR.

Review Comment:
   I'm not sure. As committer I agree to fixing minor deviations (a period in 
the end of a commit title, for instance), that's ok. However ignoring 
deviations is not fine, ignoring _minor_  deviations is fine. The enforced 
rules are not minor deviations, having a PR without a body (which will result 
in a commit message in the main tree without a body) is not a minor deviation. 
On the other hand a period in the end  of the commit title is a minor 
deviation, but what else can be considered a minor deviation? I'm certainly 
appealing to the community's good faith and will when interpreting this part. 
In general I would prefer the committer -- if she/he so wishes -- to let the 
minor deviations pass and **remind** the author, so helping to educate the 
contributors, than having committers spending cycles fixing such a minor 
deviations.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to