Pull Request Decision Explained: An Empirical Overview

Xunhui Zhang, Yue Yu, Georgios Gousios, Ayushi RastogiarXiv 2021

Abstract

Context: The pull-based development model is widely used in open source, leading trends in distributed software development. One aspect which has garnered significant attention is studies on pull request decision - identifying factors for explanation. Objective: This study builds on a decade of research on pull request decisions to explain the process. We empirically investigate how factors influence pull request decisions and the scenarios that change this influence. Method: We identify factors influencing pull request decisions on GitHub through a systematic literature review and infer them by mining archival data. We collect a total of 3,347,937 pull requests with 95 features from 11,230 diverse projects on GitHub. Using this data, we explore the relations of the factors to each other and build mixed-effect logistic regression models to empirically explain pull request decisions. Results: Our study shows that a small number of factors explain pull request decisions, with the integrator being the same or different from the submitter as the most important factor. We also noted that some factors are important only in special cases; for example, the percentage of failed builds is important for pull request decisions when continuous integration is used.

Introduction

In the modern landscape of open-source software, the pull-based development model has become the standard for distributed collaboration. However, the internal logic governing whether a pull request (PR) is accepted or rejected often remains a "black box," influenced by a complex interplay of social and technical variables. While numerous studies have examined isolated factors—such as gender, geography, or automation—a comprehensive synthesis of these influences has been lacking.

This paper presents a massive empirical study of over 3.3 million PRs to demystify the decision-making process. The researchers discovered that while the literature identifies dozens of potential influences, a tiny subset of 5 to 10 factors explains nearly 95% of PR outcomes.

Methodology

The researchers employed a rigorous multi-stage pipeline to analyze PR decisions across a vast dataset of 11,230 diverse GitHub projects, covering six major programming languages: JavaScript, Python, Java, Ruby, Go, and Scala.

Overview of the research methodology, including literature review, data collection, and statistical modeling stages.

The process involved:

  1. Systematic Literature Review (SLR): Analyzing 26 core research papers to identify 94 unique factors previously hypothesized to influence PR decisions.
  2. Data Mining: Extracting data for 95 features from over 3.3 million closed PRs using GHTorrent and the GitHub API.
  3. Statistical Modeling: Building mixed-effect logistic regression models. This approach allowed the team to identify general trends (fixed effects) while accounting for project-specific variations (random effects).
  4. Contextual Analysis: Developing specialized models for specific scenarios, such as the use of Continuous Integration (CI) tools, team size variations, and project evolution over time.

Key Insights and Results

The study's primary finding is the concentrated influence of a few key factors. The basic model achieved an Area Under the Curve (AUC) of 0.848, indicating high predictive accuracy. Remarkably, a small handful of variables explain approximately 95% of the variance in PR decisions, while the remaining 36+ factors contribute only about 5% of the explanatory power.

The Dominance of the "Same User" Factor

The single most predictive factor is same_user—whether the person who submitted the PR is also the one who has the authority to merge it. This factor alone explains 31% of the model's variance. Furthermore, human and PR-specific traits, such as the submitter's interaction history and the PR's "lifetime" (how long it remains open), were found to be far more influential than project-level metrics. Project-related factors like star counts or programming language accounted for only about 1% of the variance.

Contextual and Conditional Factors

The importance of certain factors shifts significantly depending on the project context. The study distinguishes between "pre-conditional" and "post-conditional" factors, where the relevance of one depends on the existence of another.

Mapping of post-conditional factors to their required pre-conditions.
  • Automation and CI: When Continuous Integration (CI) tools are active, the percentage of failed builds (ci_failed_perc) becomes a top-tier predictor of rejection.
  • Social Sentiment: In PRs containing discussions, the presence of positive emotion significantly increases the likelihood of acceptance. Interestingly, negative emotion has a less pronounced impact, suggesting developers may react differently to negativity in a professional context.
  • Project Maturity: The influence of an integrator's experience follows a V-shaped curve. It matters significantly in the very early stages of a project and in highly mature projects, but its impact wanes during the "middle" of a project's lifecycle.

Conclusion

While this study provides a comprehensive overview of PR decision-making, it is limited by its reliance on archival GitHub data. It cannot capture "off-platform" influences like private Slack discussions or face-to-face meetings. Future research could explore these "soft" human factors or use these empirical models to develop better recommendation tools for developers to improve their PR acceptance rates.

Summary updated

BibTeX
@misc{zhang2021pull,
  author = {Xunhui Zhang and Yue Yu and Georgios Gousios and Ayushi Rastogi},
  title = {{Pull Request Decision Explained: An Empirical Overview}},
  year = {2021},
  eprint = {2105.13970},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.13970},
}
Figure