Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

5 PR Metrics on 303 Merged PRs from pytest and pydantic: 2 Point at Review Bottlenecks

Description and use

A Python script collects PR metrics from pytest and pydantic repositories to assess if review is the bottleneck in shipping changes.

Problem

Determine if review is the slow part of shipping a change by analyzing PR metrics.

Outcome

Script outputs 303 PR records with metrics such as first review time, merge time, approval-to-merge time, review comments, cycles, and changed lines for pytest and pydantic repositories.

Workflow

  • 1. Set repository and date window (90 days).
  • 2. Authenticate with GitHub API using GITHUB_TOKEN.
  • 3. Retrieve closed PRs sorted by updated date.
  • 4. Filter PRs merged within the window and exclude bots.
  • 5. For each PR, collect author, creation and merge times, reviews, approvals, comments, cycles, and changed lines.
  • 6. Calculate time to first review, total merge time, time from last approval to merge, and other metrics.
  • 7. Append data to rows list.
  • 8. Output rows as JSON file.

Evidence

All numbers below come from the GitHub REST API, and you can rerun the script to check them.

Source

The script produces JSON with metrics for 303 merged PRs from pytest and pydantic.

Source

  • Record date: 2026-10-22T14:11:26.467Z