Project

codepulse

0.0
The project is in a healthy, maintained state
Terminal tool to analyze GitHub pull request pickup times, merge times, and sizes using the gh CLI.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Codepulse

Gem Version Build

Measure how fast your team picks up and merges pull requests. Powered by the GitHub CLI.

Installation

Prerequisites

  1. Ruby 3.0+
  2. GitHub CLI — Install and authenticate:
    gh auth login

Install from RubyGems

gem install codepulse

Install from source

git clone https://github.com/WorkBright/codepulse.git
cd codepulse
gem build codepulse.gemspec
gem install codepulse-*.gem

Usage

# In a git repo (auto-detects owner/repo)
codepulse

# Or specify explicitly
codepulse owner/repo

Options

Option Description Default
-s, --state STATE open, closed, or all all
-l, --limit COUNT Max PRs to fetch auto
--business-days DAYS PRs from last N business days 7
--date-range RANGE Date range (YYYY-MM-DD..YYYY-MM-DD) —
--details Show individual PR table (sorted by slowest pickup) off
--gh-command PATH Custom gh executable path gh

Examples

# Summary for current repo (last 7 business days)
codepulse

# Summary for specific repo
codepulse rails/rails

# With individual PR details
codepulse rails/rails --details

# Last 30 business days, limit 50 PRs
codepulse rails/rails --business-days 30 --limit 50

# Metrics for a specific date range
codepulse rails/rails --date-range 2025-10-01..2025-12-31

Output

======================================================================================
  Codepulse PR Metrics Report | Last 7 business days (Dec 16 - Dec 24)
  rails/rails
======================================================================================

  Pickup time:    Time from PR creation to first reviewer response (business days)
  Time to merge:  Time from PR creation to merge (business days)
  PR size:        Net lines changed (additions - deletions)
  Files changed:  Number of files modified in the PR

--------------------------------------------------------------------------------------
  SUMMARY (18 PRs with pickup, 3 awaiting pickup, 2 merged without pickup)
--------------------------------------------------------------------------------------

  Average pickup time:  4h 23m
  Median pickup time:   2h 15m
  Fastest pickup time:  8m
  Slowest pickup time:  2d 5h

  ...

What is calculated

  • Pickup time: Time from PR creation to first non-author response (business days, excludes US holidays)
  • Time to merge: Time from PR creation to merge (business days, excludes US holidays)
  • PR size: Net lines (additions − deletions) and files changed
  • Stats: Average, median, p95 (when 50+ PRs), fastest, slowest

Filters

  • Default 7 business days: Only analyzes recent PRs
  • Closed unmerged PRs excluded: Abandoned PRs are filtered out
  • Bots ignored: Copilot, GitHub Actions, and other bot reviewers don't count as pickup
  • US holidays excluded: Federal holidays are not counted as business days

Development

# Run local version without installing (picks up your changes immediately)
bin/codepulse owner/repo

# Run tests
rake test

# Lint
rubocop

# Build and install locally
rake install

# Release new version (bumps tag, pushes to git and RubyGems)
rake release

License

MIT