惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
P
Privacy & Cybersecurity Law Blog
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
T
Threat Research - Cisco Blogs
Schneier on Security
Schneier on Security
S
Securelist
N
News | PayPal Newsroom
I
Intezer
H
Hacker News: Front Page
P
Privacy International News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
A
About on SuperTechFans
P
Proofpoint News Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Project Zero
Project Zero
Cloudbric
Cloudbric
N
News and Events Feed by Topic
大猫的无限游戏
大猫的无限游戏
Attack and Defense Labs
Attack and Defense Labs
博客园 - 叶小钗
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
月光博客
月光博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
博客园 - Franky
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
I
InfoQ
有赞技术团队
有赞技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
Microsoft Azure Blog
Microsoft Azure Blog
S
Security Affairs
Apple Machine Learning Research
Apple Machine Learning Research
腾讯CDC
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
Scott Helme
Scott Helme

Graphite blog

Introducing Code Tours: a new way to review Introducing Cursor Cloud Agents in Graphite Building the future of software development with Cursor Reimagining the PR Page: Designing for speed and focus Graphite changelog [11-20-2025] Graphite changelog [11-04-2025] Graphite changelog [10-16-2025] The future of engineering is collaborative (and already here) Meet Graphite Agent: the next evolution of AI code review Introducing frozen branches: A safer way to build on your teammates’ work Graphite changelog [09-17-2025] How we sped up code search for Graphite Chat Introducing Graphite Chat AI is writing code—here's why it also needs to review that code How I got Claude to write code I could actually ship How we built the first stack-aware merge queue (and why it matters) How we organize our monorepo to ship fast Graphite brings stacking to Tower Code review tooling: Should you build or buy? Making AI code review available to everyone Introducing: The new Graphite + Linear integration Graphite raises $52M and launches Diamond to reimagine code review for the age of AI Why AI will never replace human code review How stacked PRs unblock distributed development teams Graphite is going to Developer Week 2025 Beating the end of year code freeze How Graphite’s eng team ships code remarkably fast Why we chose Anthropic's Claude to power Graphite Reviewer AI code generation will remain fragmented How we redesigned Graphite's landing page in-house Introducing Graphite Reviewer: your AI code review companion How AI code review reduces review cycles to improve developer productivity What if you could get instant feedback on your code? The new developer toolchain Not Rocket Science - How Bors and Google’s TAP inspired modern merge queues Graphite's State of code review 2024 How Google migrated billions of lines of code from Perforce to Piper Going from 0 to 1: How to write better unit tests when there are none Speed up your merges: Parallel CI is now generally available for teams using Graphite’s merge queue Down for less than four minutes a month: how AWS deploys code BitKeeper, Linux, and licensing disputes: How Linus wrote Git in 14 days Graphite is now free for startups and open source projects Launch week wrap-up (May 2024) Reduce CI costs for Buildkite and GitHub Actions Cheaper CI & faster merging with batching How Google does code review The technical learning curve at a startup is gentler than you might think Graphite will now automatically rebase your partially-merged stacks Multiple engineers can now seamlessly collaborate on the same stack of PRs Do you ever outgrow GitHub? From the 80's to 2024 - how CI tests were invented and optimized Graphite changelog [4/10/2024] 🎺 Graphite changelog [4/25/2024] 🐸 How Stack Overflow replaced Experts Exchange How GitHub monopolized code hosting Graphite changelog [3/27/2024] 🤝 The core principles of building a good AI feature Onboarding roulette: deleting our employee accounts daily Graphite changelog [3/13/2024] 🚁 Why Facebook doesn’t use Git How to recreate the Phabricator code review workflow Types of code reviews: Improve performance, velocity, and quality What's the best GitHub pull request merge strategy? Phabricator vs GitHub vs Graphite: How do they stack up? Improving team velocity through better pull request practices Moving fast breaks things: the importance of a staging environment Building trust as a software engineer Keeping code simple: moving fast by avoiding over-engineering What's better than GitHub pull request filters? The Graphite pull request inbox 7 Best Phabricator alternatives for PR stacking + code review [2024] Accurate eng estimations: predicting and negotiating the future 8 pull request best practices for optimal engineering What’s next for Graphite Graphite Q1 Launch week: Stacking with the tools you love Graphite Q1 Launch week: Making stacking seamless Accelerating code review The Mom Test How to use stacked PRs to unblock your entire team Graphite Q1 launch week 2024 The practical and philosophical problems with AI code review Empirically sup code review best practices Call site attribution: how to pinpoint rogue SQL queries throttling your performance Every engineer should understand git reflog Post mortem: we took 124 seconds from you, here's 378 back Your GitHub pull request workflow is slowing everyone down Optimizing CI/CD workflows for trunk-based development Why we use AWS instead of Vercel to host our Next.js app How large pull requests slow down development 3 key lessons in application server optimization Trunk-based development: why you should stop using feature branches Git was built in 5 days Why large companies and fast-moving startups are banning merge commits How long should your CI take? Experimenting with AI code review CRA to AppRouter in 5 Steps: A case study with Graphite Graphite Changelog [10/18/2023] The comprehensive guide to writing the best PR title of all time How 10,000 Developers All Contribute to the same Repo
Tracking and understanding GitHub PR stats: A step-by-step guide
Ninad Pathak · 2024-01-22 · via Graphite blog

Developers strive for efficiency. We want to ship high-quality code quickly, collaborate seamlessly with teammates, and create impactful features.

With a flood of notifications and constant context switching however, it can be challenging to zoom out and objectively assess the health and velocity of your projects. Without visibility, it's tough to optimize.

This is where tracking PR stats comes in handy.

Having the right PR metrics at your fingertips helps you spot pain points in your process and answer questions like:

  • Do certain pull requests take longer to merge than others?

  • Do changes get bounced back and forth endlessly before landing?

Once you identify the bottlenecks, you can correct and optimize workflows based on quantitative data. The result? Higher quality code, shipped faster.

While GitHub’s pull request workflow can be slower and make tracking insights difficult, don’t lose hope. There are many other ways to get detailed PR insights at your fingertips.

Let’s dive into what pull request metrics to track, how to get those PR insights, and how you can make the most of them for your workflow.

What pull request metrics should you track and why?

Before you begin measuring data, you need to know what metrics will make the most impact. After studying a variety of leader opinions across various platforms, we’ve identified a few PR metrics that people like to start with.

  • Time to first review: How long until someone looks at your new PR?

  • Publish to merge time: How long is your typical PR lifecycle from opening to merging?

  • Review cycles until merge: How many cycles of back-and-forth before landing code?

  • Throughput: Volume of PRs merged over time.

These help you pinpoint progress, participation, and bottlenecks over time.

Why track pull request stats?

Tracking pull request statistics on GitHub provides benefits beyond surface-level task tracking:

  • It offers deep insight into your team's work patterns.

  • It aids in identifying roadblocks early.

  • It assists with workload estimation by providing historical data.

Additionally, it fosters proactive discussions around code quality and team collaborations—two immensely valuable topics in any software development unit.

How to get pull request stats on GitHub?

GitHub provides developers access to repository data through its REST API and GraphQL API. 

At first glance, these interfaces offer everything needed to pull raw PR data and calculate custom metrics. 

However, while the foundations are there, building a metrics pipeline on top of GitHub's API is an uphill battle. You need to invest development resources in building usable insights.

The main challenges include:

  • Scattered data: Relevant PR data lives across various endpoints like pull requests, issues comments, review comments, etc. This means making multiple calls and stitching together data.

  • No out-of-the-box metrics: While GitHub returns activity log data, it does not synthesize or calculate metrics like review cycles. The developer needs to craft business logic for the required metrics here.

  • Pagination complexity: API responses return paginated data sets. To retrieve comprehensive metrics, developers must follow the subsequent page links and aggregate all records.

  • Visualization effort: Raw JSON data isn't useful alone. Developers looking to spot trends must plot time series charts and create shareable reports.

  • Maintenance overhead: Any custom GitHub metrics script breaks easily with API changes and needs upkeep. As new use cases arise, holes in the dataset get uncovered.

Let’s look at the steps in building customized PR metrics using GitHub’s API. Do note that these are not full code snippets and are only meant as a direction to help set up your custom PR metrics. 

Step 1: Authentication

Begin by generating a personal access token to authenticate against the API:

curl -u "username" -d '{"note":"metrics_token","scopes":["repo"]}' \

https://api.github.com/authorizations

Save the returned token value to use in subsequent requests.

Step 2: Locate relevant endpoints

The GitHub API has over 500 endpoints spanning REST, GraphQL, and other access methods. For metrics, potential options include:

Step 3: Query required data

Use curl commands to call endpoints and extract metrics-related data. For example, to get PR metadata:

curl -H "Authorization: token <token>" https://api.github.com/repos/:owner/:repo/pulls

Step 4: Convert data into usable form

Transform the JSON output into formats suitable for calculations and visualization. We can easily do that with the Python json library.

import json

with open('pull_requests.json') as f:

data = json.load(f)

pr_created_times = [pr['created_at'] for pr in data]

Step 5: Calculate metrics

Once the data is stored in a usable data type, the onus falls on the developer to add custom calculations, data ranges, and reporting capabilities.

from datetime import datetime

date1 = datetime.strptime(pr1_created, "%Y-%m-%dT%H:%M:%SZ")

date2 = datetime.strptime(pr2_created, "%Y-%m-%dT%H:%M:%SZ")

delta = date1 - date2

print(f"{delta.days} days")

Step 6: Graph and visualize

Use graphing libraries to chart trends over time based on the data you pull from GitHub API.

import matplotlib.pyplot as plt

weeks = []

pr_counts = []

plt.title("Weekly PRs")

plt.plot(weeks, pr_counts)

plt.savefig('pr_trends.png')

Alternative, less technical approaches

The above workflow requires significant effort. Some alternative options include:

While GitHub's API enables pulling raw activity data, all post-processing sits squarely on the developer. This requires significant initial investment, and ongoing maintenance is needed to fix broken endpoints, cover new use cases, and update visuals. 

There has to be an easier way to unlock PR insights.

How to get pull request stats using Graphite?

Graphite Insights has out-of-the-box analytics available from the start.

Once the Graphite integration is set up on your repositories, metrics are automatically compiled in the background without extra work.

Some of the key metrics provided include:

  • PRs merged: Total pull requests merged over some time.

  • Publish to merge time: Median time from review request to response.

  • Wait time to first review: Median time PR is open until merged.

  • Review cycles until merge: Volume of pull requests merged per period.

These metrics are pre-aggregated at organization and individual levels, powered by Graphite's activity timeline. It tracks every event across PRs, including reviews, comments, state changes, etc.

To access the metrics, log into your Graphite account and navigate to the Insights tab. You can then:

Switch between preset time ranges like last week, month, or pick custom dates.

You can also filter by repositories and contributors.

Then “save” and share custom metric views.

You can then explore charts and numbers and so much more.

Under the hood, Graphite handles all the complexity of tracking activity, computing metrics, visualizing trends, and refreshing the reports automatically as new data comes in.

The benefits are instantly available and shareable metrics that provide enhanced visibility into developer productivity, collaboration efficiency, and project health—with no coding required.

Get your pull request statistics and analytics seamlessly

Getting actionable insights from pull request data shouldn't be a heavy lift. While GitHub provides activity logs and comprehensive API access, transforming the data into meaningful metrics requires stitching data sources, writing scripts to process and visualize trends, and maintaining your custom solution.

Graphite does things differently.

Graphite's seamless GitHub integration and purpose-built analytics engine help your team skip straight to the metrics that matter—no duct taping. 

You get out-of-the-box visibility into developer productivity, project cadence, and collaboration friction that helps spot bottlenecks early. The shared, interactive reports empower data-informed decisions to keep teams running fast.

So why settle for makeshift metrics or flying blind? 

Graphite offers next-generation pull request analytics data that just works. This simplicity means more time building and less time reporting. 

So, when understanding what drives shipping velocity, Graphite delivers the insights that engineering teams need to make strategic decisions. 

The only question is, would you want to benefit from the increased developer productivity?