Nudge: Accelerating Overdue Pull Requests toward Completion

Chandra Shekhar Maddila, Sai Surya Upadrasta, Chetan Bansal, Nachiappan Nagappan, Georgios Gousios, Arie van Deursen · DOI

Introduction

In modern collaborative software engineering, the pull request (PR) is the fundamental unit of code integration. However, PRs frequently become bottlenecks. When reviewers are overloaded or authors overlook feedback, PRs can remain idle for extended periods. These "long-lived" PRs are more than a nuisance; they increase the likelihood of complex merge conflicts, disrupt team communication, and delay feature delivery.

While automated reminder bots exist, they often suffer from a lack of context, sending generic pings that developers eventually ignore as "noise." To address this, researchers at Microsoft and Delft University of Technology developed Nudge, an intelligent service designed to identify truly "stuck" PRs and notify the specific individual responsible for the delay.

The Nudge Methodology

Nudge operates by monitoring the state transitions of pull requests within a repository. As shown in Figure 1, a PR moves through various stages—from being 'Active' to 'Waiting for author' or 'Approved'—before reaching a terminal state such as 'Merged', 'Rejected', or 'Abandoned'.

To intervene effectively without causing developer fatigue, Nudge utilizes a sophisticated four-stage pipeline (Figure 2).

1. Lifetime Prediction Model

Rather than applying a uniform timeout, Nudge uses a Gradient Boosting regression model to predict the expected lifetime of a specific PR. The model incorporates 28 distinct features, such as the day of the week, the author’s experience level, the number of reviewers, and the types of files modified (e.g., critical configuration files).

2. Activity Detection

This component serves as a critical gatekeeper. Even if a PR exceeds its predicted lifetime, Nudge suppresses notifications if there has been any activity—such as new commits, comments, or state changes—within the last 24 hours. This ensures that developers are not interrupted while they are already actively working on a resolution.

3. Actor Identification

When a PR is deemed both overdue and idle, Nudge identifies the specific "blocker." Using a decision flowchart, the system determines whether the author needs to address feedback or if a reviewer has yet to perform their task.

4. Targeted Notification

Once the blocker is identified, the bot sends a targeted @-mention in the PR comments. This transforms a generic reminder into an actionable task for a specific person.

Experimental Setup and Datasets

The effectiveness of Nudge was evaluated using three distinct datasets from Microsoft’s internal ecosystem:

  • Training Set: 22,875 completed PRs from 10 diverse repositories were used to train the prediction models.
  • Randomized Trial: A controlled experiment involving 8,500 PRs across 147 repositories compared "nudged" PRs against a control group.
  • Scale Deployment: A year-long rollout to 8,000 repositories, involving 210,000 notifications sent to 40,000 unique developers.

Key Findings and Performance

The deployment of Nudge yielded significant improvements in development velocity:

  • Resolution Speed: In the randomized trial, Nudge reduced average PR resolution time by 60.62%, cutting the duration from approximately 197 hours to 77 hours.
  • Precision and Impact: 81.53% of PRs receiving a notification were closed within one week.
  • Developer Sentiment: Despite the potential for bot fatigue, 73% of developers viewed the notifications positively. The use of @-mentions was particularly praised for eliminating the need for developers to manually determine whose turn it was to act.

Discussion and Insights

The success of Nudge highlights several key principles in developer tooling:

  • Context Over Cadence: A bot’s utility is defined by its restraint. The activity detection layer was vital in maintaining positive developer sentiment by reducing false alarms.
  • Intent and Seniority: The research confirmed that bug fixes typically move faster than new features. Furthermore, the "age of the author in the team" (seniority) correlated with faster PR resolution, likely due to better navigation of social and technical dynamics.

Limitations and Future Work

While highly effective, Nudge has limitations. It currently lacks awareness of inter-PR dependencies, where one PR might be blocked by another. It also has limited visibility into developer availability, such as vacations or public holidays. Future research may explore whether high-velocity nudging impacts the quality of code reviews or if the system can learn from "Won't Fix" resolutions to refine its predictions.

Conclusion

Nudge demonstrates that intelligent, context-aware automation can significantly alleviate bottlenecks in the software development lifecycle. By combining machine learning-based estimation with precise actor identification, Nudge accelerates code integration while maintaining a high level of developer satisfaction.

Summary updated

BibTeX
@article{maddila2023nudge,
  author = {Chandra Shekhar Maddila and Sai Surya Upadrasta and Chetan Bansal and Nachiappan Nagappan and Georgios Gousios and Arie van Deursen},
  title = {{Nudge: Accelerating Overdue Pull Requests toward Completion}},
  journal = {ACM Trans. Softw. Eng. Methodol.},
  year = {2023},
  doi = {10.1145/3544791},
}
Figure