From 313722dc3810c02c17b1dde9460b17748e1b771b Mon Sep 17 00:00:00 2001 From: anish-devgit Date: Mon, 12 Jan 2026 21:17:00 +0530 Subject: [PATCH] docs: improve issue referencing in commit messages and code (#106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated contributing.rst to fix typo: enthusiatic → enthusiastic - Enhanced writing_good_commit_messages.rst to recommend full GitHub URLs for issue references instead of shorthand (#123) format - Added guidance on when to use shorthand vs. full URLs: * Shorthand acceptable for commits within same repository * Full URLs required for code comments to prevent broken references when code is moved between repositories This change helps maintain traceability when code and documentation are migrated to different repositories. Fixes https://github.com/aboutcode-org/aboutcode/issues/106 Signed-off-by: Anish --- docs/source/contributing.rst | 2 +- .../writing_good_commit_messages.rst | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 7c039b8..1dc3d06 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -3,7 +3,7 @@ Contributing to AboutCode ######################### We welcome you and your interest in contributing to open source software! -AboutCode is always looking for enthusiatic contributors and we are happy +AboutCode is always looking for enthusiastic contributors and we are happy to help with any questions or comments. Here a few resources to get started: diff --git a/docs/source/contributing/writing_good_commit_messages.rst b/docs/source/contributing/writing_good_commit_messages.rst index d604d41..14a74da 100644 --- a/docs/source/contributing/writing_good_commit_messages.rst +++ b/docs/source/contributing/writing_good_commit_messages.rst @@ -19,7 +19,13 @@ The main style points are these: Subject: -- Add a issue number at the end of the line when available as in "#234" +- Add an issue reference at the end of the line when available. For commit + messages within the same repository, you can use the shorthand format like + "Fixes #234". However, for code comments or cross-repository references, + always use full GitHub URLs (e.g., + "https://github.com/aboutcode-org/aboutcode/issues/234") to prevent broken + references if the code is moved to another repository. See + https://github.com/aboutcode-org/aboutcode/issues/106 for more context. - Limit the subject line to 50 characters - Capitalize the subject line - Do not end the subject line with a period @@ -38,15 +44,16 @@ Body: Other comments: -We like to suffix the subject line with an issue number. If this was a -trivial change it may not have one though. If it had one a you would use -``#156`` as a suffix to the first line. +We like to suffix the subject line with an issue reference. If this was a +trivial change it may not have one though. For commits within this repository, +you can use the shorthand ``#156`` as a suffix to the first line. For code +comments that might be moved to other repositories, use full URLs. We like to tell why the commit is there and use an imperative style, like if you were giving an order to the codebase with your commit: e.g rather than : ``Minor fix for unnecessary operations.`` may be ``Remove -unnecessary operations #123`` or:: +unnecessary operations https://github.com/aboutcode-org/aboutcode/issues/123`` or:: Remove unnecessary operations #123