]> git.kaiwu.me - njs.git/commitdiff
Centralize commit message guidance
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 29 May 2026 22:34:01 +0000 (15:34 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Mon, 1 Jun 2026 15:44:59 +0000 (08:44 -0700)
Make CONTRIBUTING.md the canonical source for commit message style and point
agent development notes to that guide instead of duplicating the rules.

CONTRIBUTING.md
docs/agent/engine-dev.md

index a4ef7937b1477e8504be1c616dcd49675a097b7e..9d85a99eaa127039c6e3dec6e75fa11dfbec2655 100644 (file)
@@ -80,16 +80,20 @@ about coding conventions and style.
 - Keep a clean, concise and meaningful git commit history on your branch,
   rebasing locally and squashing before submitting a PR
 
-- In the subject line, use the past tense ("Added feature", not "Add feature");
-  also, use past tense to describe past scenarios, and present tense for
-  current behavior
+- Each commit message should have a single-line subject line followed by a
+  verbose description after an empty line.
 
-- Limit the subject line to 67 characters, and the rest of the commit message
-  to 80 characters
+- Limit the subject and commit message body lines to 72 characters.
 
-- Use subject line prefixes for commits that affect a specific portion of the
-  code; examples include "Tests:", "HTTP:", or "Core:". See the commit history
-  to get an idea of the prefixes used.
+- Use a subject line prefix only when local history clearly uses one for the
+  changed area; examples include "HTTP:", "Stream:", "QuickJS:", "Tests:", or
+  "Modules:". Otherwise use no prefix; do not invent generic prefixes.
 
-- Reference issues and PRs liberally after the subject line; if the commit
-  remedies a GitHub issue, [name it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) accordingly
+- Read recent commit history and write commit logs in the established njs
+  style.
+
+- If the commit fixes an open issue, use the phrase
+  "This closes #nn issue on GitHub."
+
+  That should go at the end of the commit message, separated by a blank line,
+  along with any other tags.
index f7a764c0921337751ca180700b8c6e43635d08be..89f0b78ad7fdbd36cab548f9d3d10bd065267f67 100644 (file)
@@ -147,13 +147,7 @@ NGINX coding style:
 
 Commit messages:
 
-- Past tense subject (`Added X`, `Fixed Y`).
-- Subject ≤72 chars, body wrapped to ~80 chars.
-- Use a subject prefix only when local history clearly uses one for the
-  changed area, such as `HTTP:`, `Stream:`, `QuickJS:`, `Tests:`, or
-  `Modules:`. Otherwise use no prefix; do not invent generic prefixes.
-- Read recent commit history and write commit logs in the established njs
-  style.
+- Follow the [Git style guide](../../CONTRIBUTING.md#git-style-guide).
 - One logical change per commit; rebase/squash before submitting.
 
 ## Project layout