Automatic Pull Request Description Generation Using LLMs: A T5 Model Approach
Md Nazmus Sakib, Md Athikul Islam, Md Mashrur Arifin
TL;DR
The paper tackles automatic PR description generation by casting it as a text-to-text summarization problem. It fine-tunes a T5-base model on a large PR dataset (commit messages and code comments as input) and evaluates against LexRank using ROUGE metrics, showing that T5 significantly improves description quality. Key contributions include a data collection and preprocessing pipeline, a T5-based training framework, and empirical evidence that transfer learning from a large corpus (C4) benefits PR description generation. The work demonstrates practical value for developers and reviewers and suggests avenues for expanding automated summaries to other software-engineering tasks with larger datasets and different LLMs.
Abstract
Developers create pull request (PR) descriptions to provide an overview of their changes and explain the motivations behind them. These descriptions help reviewers and fellow developers quickly understand the updates. Despite their importance, some developers omit these descriptions. To tackle this problem, we propose an automated method for generating PR descriptions based on commit messages and source code comments. This method frames the task as a text summarization problem, for which we utilized the T5 text-to-text transfer model. We fine-tuned a pre-trained T5 model using a dataset containing 33,466 PRs. The model's effectiveness was assessed using ROUGE metrics, which are recognized for their strong alignment with human evaluations. Our findings reveal that the T5 model significantly outperforms LexRank, which served as our baseline for comparison.
