Manuscript Offprint

arXiv:2610.34374

ComBeautify: Leveraging Code Change Summaries for Conventional Commit Generation

Rishi Raj, Aashray Tandon, Nikolay Matyunin, Jibesh Patra

Abstract

Modern software development extensively relies on Version Control Systems (VCS) such as Git to track changes and facilitate collaboration. While commit messages are crucial for conveying developer intent, they do not directly affect program functionality; as a result, developers often lack motivation to write meaningful commit messages. The Conventional Commits Specification (CCS) addresses this issue by introducing a structured format and guidelines that help developers express the intent of a change, improving clarity, and enabling automation. Despite these specifications, developers frequently struggle to express intent while adhering to the format. In particular, they may misclassify commits due to the large number of possible categories or the lack of project-specific guidance. In this paper, we introduce ComBeautify, an approach that automatically generates CCS-compliant commit messages. We use a hybrid approach that leverages context-preserving summarization of Git diffs with large language models (LLMs) to improve commit classification accuracy under CCS. Rather than relying on manually curated category definitions, we learn them from historical commits. We also propose a method for automatically generating the CCS description component.

Our extensive empirical evaluation across 13 languages, 6,500 open-source repositories, and over 20 million commits demonstrates long-term insights into CCS adoption trends, revealing increasing compliance. Our evaluation on twenty popular repositories reveals the limitations of approaches guided by generic category definitions, and shows that ComBeautify, when trained on project-specific data, outperforms baseline approaches by up to 3×3\times in some cases. Additionally, using a dataset of 2,000 manually curated commits, we validate our summarization approach, achieving up to 95.25% accuracy and

Rishi Raj, Aashray Tandon, Jibesh Patra

IIT Kharagpur, India

E-mail: rishiraj45035@gmail.com, aashraytandon1000@gmail.com, jibesh.patra@gmail.com

Nikolay Matyunin,

Honda Research Institute Europe GmbH, Germany

E-mail: nikolay.matyunin@honda-ri.de

Rishi Raj, Aashray Tandon, Nikolay Matyunin, Jibesh Patra

surpassing baseline methods. These findings emphasize the need for adaptable, context-aware AI methods for commit classification and generation of CCS-compliant commit messages.

1 Introduction

Version Control Systems (VCS) such as Git, Subversion, and Mercurial have become an integral part of the modern software development workflow. They allow multiple developers to collaborate on a project, keeping track of the modifications to the codebase. A commit is a fundamental operation that captures a snapshot of changes made to the codebase at a particular point. In addition to changes in the codebase, a commit contains additional information such as the author of the change, the time and date of the commit, and a commit message typically written in a natural language. The commit message is primarily used to express the developer's intent behind the change and to communicate it with other developers.

Since commit messages themselves do not directly impact any functionality brought by the changes, developers often lack the motivation to write a proper commit message. Consider the commit 487c6a5 from the httpd repository of the apache project shown in Figure 1 (top). This message is informal, self-reflective, and lacks a clear technical explanation of the changes made. It references internal team dynamics and personal circumstances rather than providing an objective summary of the modification and as a result such messages are often discouraged.

Commit 487c6a5 - httpd (Original)

Greg was right, I was wrong. We don;t need these here anymore, since the copy is done directly from the server directory. I need more sleep. :)

2 files changed +1 -2 lines changed

support/.cvsignore -1 Lines changed: 0 additions & 1 deletion support/Makefile.in

+1 -1 Lines changed: 1 addition & 1 deletion

github.com/apache/httpd/commit/487c6a5

Figure

Commit 487c6a5 - httpd (ComBeautify Output)

chore: remove httpd.exp from DISTCLEAN_TARGETS

Fig. 1 Commit message from the httpd repository (top), and its transformation into a CCS-compliant message (bottom) by our approach, ComBeautify. The original message is informal and lacks technical detail, while the generated message adheres to CCS with a clear type and description.

To this end, Tian et al. (2022) propose a criterion for a high-quality commit message, emphasizing that it should consist of both ‘what’ (summary of changes in the commit) and ‘why’ (reasons for making those changes). Their analysis of five open source projects finds that 44% of the commit messages lack essential information, of these 44% contain only ‘what’, 12% only contain ‘why’, and 4% contain neither ‘why’ nor ‘what’. This highlights a prevalent issue in modern software development: writing a highly effective commit message. This can be due to developers deprioritizing writing high-quality messages due to time constraints and the belief that changes are self-explanatory. In addition to this, there is a lack of clear guidelines on what constitutes a good commit message in many projects, and distributed teams with varying practices further contribute to this inconsistency. These challenges highlight the need for an automated tool to help developers write highly effective commit messages.

The lack of a standardized commit format often leads to fragmented and ambiguous commit messages, hindering effective repository management and code understanding. To address this, the Conventional Commits Specification (CCS) introduces a standardized, project-agnostic format. It specifies that a commit message should be structured as <type>[optional scope]: <description>, followed by an optional body and footer. For example, consider the commit 3839cfb taken from the GitHub repository of Angular shown in Figure 2 (and abbreviated here for brevity). The <type> in this case is fix and the <description> is “Routed components never inherit RouterOutlet EnvironmentInjector”. The commit fixes a bug in response to an issue report. The intention of the developer is made clear through the use of the fix type and a one-line description to explain the change. router represents the [scope] which provides additional context to the type. The remaining part of the commit message contains the body and the last line represents the footer.

References (25)