arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.14611cs.SE
收藏

有效拉取请求描述的价值

The Value of Effective Pull Request Description

University of Zurich(苏黎世大学);INESC TEC(葡萄牙科技研究所)

Shirin Pirouzkhah, Pavlína Wurzel Gonçalves, Alberto Bacchelli

AI总结:

研究探讨了PR描述对代码审查的影响,发现目的和代码解释对开发者有帮助,而明确反馈类型预测更改接受度。

摘要:

在基于拉取的开发模型中,代码贡献作为拉取请求(PR)提交以供其他开发者审查和批准,目标是将其合并到代码库中。一个PR可以附带一个描述,其作用尚未系统地研究。为了填补这一空白,我们进行了一项混合方法的实证研究,研究PR描述。我们进行了灰色文献综述,回顾了关于编写PR描述的指南,并推导出八个推荐要素的分类学。使用这个分类学,我们分析了80,000个GitHub PRs,涵盖156个项目和五种编程语言,以评估这些要素与代码审查结果(如合并决定、延迟、首次响应时间、审查评论和审查迭代周期)之间的关联。为了补充这些结果,我们调查了64名开发者对每个要素的感知重要性。最后,我们分析了哪些提交时间因素预测PR是否包含描述以及它们包含哪些要素。我们发现,开发者认为PR描述很重要,但其要素的意义不同:目的和代码解释被开发者用于保留更改的合理性和历史,而明确说明所需的反馈类型最能预测更改的接受度和审查者的参与度。PR描述在成熟项目和复杂更改中更为常见,表明它们是在最有用的时候编写,而不是作为一种形式主义。

英文摘要:

In the pull-based development model, code contributions are submitted as pull requests (PRs) to undergo reviews and approval by other developers with the goal of being merged into the code base. A PR can be supported by a description, whose role has not yet been systematically investigated. To fill in this gap, we conducted a mixed-methods empirical study of PR descriptions. We conducted a grey literature review of guidelines on writing PR descriptions and derived a taxonomy of eight recommended elements. Using this taxonomy, we analyzed 80K GitHub PRs across 156 projects and five programming languages to assess associations between these elements and code review outcomes (e.g., merge decision, latency, first response time, review comments, and review iteration cycles). To complement these results, we surveyed 64 developers about the perceived importance of each element. Finally, we analyzed which submission-time factors predict whether PRs include a description and which elements they contain. We found that developers view PR descriptions as important, but their elements matter differently: purpose and code explanations are valued by developers for preserving the rationale and history of changes, while stating the desired feedback type best predicts change acceptance and reviewer engagement. PR descriptions are also more common in mature projects and complex changes, suggesting they are written when most useful rather than as a formality.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑