The median developer's PRs take 14 hours to merge
  • The median active developer’s PR is merged within 14 hours after publishing. When excluding PRs merged without any reviews, the median developer’s time to merge increases 21%, from 14 to 17 hours.

  • The median PR is merged within 4.7 hours after publishing. Excluding PRs without reviews, the median time jumps to 10 hours.

  • This lets us know a couple things:

    • As expected, reviews play the largest role in determining a PR’s time to merge.

    • The majority of all PRs merged are from a smaller set of developers who merge more frequently.

    • Developers who merge more frequently also tend to merge faster and merge more often without waiting for reviews.

If we cut by how frequently developers’ weekly merge frequency, we see that developers who ship code more frequent tend to have lower hours-to-merge. (See how we define active developers here)

Median hours for dev to merge by frequency

When we limit to PRs with any reviews, then the median active developer’s PR increases to 17 hours to merge. While we see the time-to-merge increase across the board, limiting to reviewed PRs especially affects the median time to merge for more active developers.

  • Developers who merge a median of ≥ 4 PRs a week see a 49% increase, from 3.8 hours to 5.9 hours

  • Developers who merge a median of 1 PR a week see a 7% increase, from 19.2 to 20.6 hours.

Median hours to merge by review status

  • Developers that merge more frequently greatly influence this number: the median PR's time-to-merge is 4.7 hours but, as noted above, a median developer's PR takes 14 hours to merge.

  • 34% of PRs are merged in under an hour. Of these < 1 hr to merge PRs, 35% are merged without any reviews.

  • There is a very long tail: the average PR is merged 60 hours after being published.

Distribution of hours to merge pr

  • When we limit to just PRs with any reviews, the time to merge jumps to 10 hours. Unsurprisingly, PRs with more reviews prior to merging take longer to merge.

Median hours to merge

The single largest factor is that affects a PR’s time to merge is whether it is merged with any reviews. When limiting to reviewed PR, the most factors that seem to affect time to merge are:

  • time to first review
  • the number of lines modified in the PR
  • the number of reviews
  • company size

We will dive more into each topic later.

To calculate a median developer's median time to merge, we:

  • Filter for active developers and their PRs merged since 1/2023

    • When the analysis calls for it, we further filter PRs (e.g., to only those with reviews)
  • Calculate the median time between a PR publish time and merge time per developer

  • Calculate the median time to merge across all active developers

    • When called for, we further cut developers by dimensions such as their org size, their median PRs merged per week, etc.