[Paper Review] Which Pull Requests Get Accepted and Why? A study of popular NPM Packages
This study develops a Random Forest model to predict the likelihood of a pull request (PR) being accepted within a month in popular NPM packages, using 14 key predictors from author activity, PR metadata, and project context. The model achieves an AUC-ROC of 0.95, demonstrating high accuracy in forecasting PR acceptance, with strong predictive power from developer reputation metrics and early PR characteristics.
Background: Pull Request (PR) Integrators often face challenges in terms of multiple concurrent PRs, so the ability to gauge which of the PRs will get accepted can help them balance their workload. PR creators would benefit from knowing if certain characteristics of their PRs may increase the chances of acceptance. Aim: We modeled the probability that a PR will be accepted within a month after creation using a Random Forest model utilizing 50 predictors representing properties of the author, PR, and the project to which PR is submitted. Method: 483,988 PRs from 4218 popular NPM packages were analysed and we selected a subset of 14 predictors sufficient for a tuned Random Forest model to reach high accuracy. Result: An AUC-ROC value of 0.95 was achieved predicting PR acceptance. The model excluding PR properties that change after submission gave an AUC-ROC value of 0.89. We tested the utility of our model in practical scenarios by training it with historical data for the NPM package extit{bootstrap} and predicting if the PRs submitted in future will be accepted. This gave us an AUC-ROC value of 0.94 with all 14 predictors, and 0.77 excluding PR properties that change after its creation. Conclusion: PR integrators can use our model for a highly accurate assessment of the quality of the open PRs and PR creators may benefit from the model by understanding which characteristics of their PRs may be undesirable from the integrators' perspective. The model can be implemented as a tool, which we plan to do as a future work.
Motivation & Objective
- To identify which pull requests in popular NPM packages are most likely to be accepted within a month.
- To understand the impact of author characteristics, PR properties, and project context on PR acceptance probability.
- To build a predictive model that supports PR integrators in prioritizing work and contributors in improving their submissions.
- To evaluate the model’s performance using only pre-merge PR attributes to ensure practical applicability.
Proposed method
- Collected 483,988 PRs from 4,218 popular NPM packages (≥10k monthly downloads) using the GitHub API.
- Extracted 50 predictors covering author activity (e.g., commits, projects, blobs), PR metadata (e.g., file count, lines changed), and project-level features (e.g., stars, issues).
- Trained a Random Forest classifier on historical PR acceptance data to predict acceptance within one month of creation.
- Selected 14 most predictive features through model tuning and feature importance analysis.
- Evaluated model performance using AUC-ROC on both full and pre-merge-only feature sets.
- Validated practical utility by training on historical data and testing on future PRs in the bootstrap package.
Experimental results
Research questions
- RQ1Which characteristics of a pull request most strongly predict its acceptance within one month of submission?
- RQ2How do developer reputation and experience metrics influence the likelihood of PR acceptance?
- RQ3To what extent can PR acceptance be predicted using only information available at the time of PR creation?
- RQ4How does the inclusion of post-creation PR properties affect prediction accuracy?
Key findings
- The model achieved an AUC-ROC of 0.95 when using all 14 selected predictors, indicating high predictive accuracy for PR acceptance.
- Excluding post-creation PR properties (e.g., comments, review comments) still yielded a strong AUC-ROC of 0.89, showing robustness with early signals.
- When tested on future PRs in the bootstrap package, the model achieved an AUC-ROC of 0.94 using all 14 predictors, confirming practical predictive power.
- The model’s performance dropped to 0.77 when excluding post-creation PR properties, highlighting the value of dynamic interaction signals.
- Authors with experience across 700+ projects, 1,000+ commits, and 3,000+ blobs showed a significant increase in PR acceptance probability, indicating a reputation threshold effect.
- Surprisingly, project popularity metrics (e.g., stars, forks) and issue fix indicators were not significant predictors, suggesting limited influence on acceptance decisions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.