npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

git-blame-blame

v0.3.0

Published

Find who approved the PR that introduced a bug

Downloads

610

Readme

npm License: MIT

git-blame-blame

Find who approved the PR that introduced a buggy line of code.

Description

git-blame-blame goes one step further than git blame. It not only identifies the commit that introduced a line of code, but also finds the pull request associated with that commit and lists everyone who approved it.

Install

npm install -g git-blame-blame

Requirements

  • A GitHub personal access token with repo scope
  • Set the GITHUB_TOKEN environment variable (or use the --token flag)
export GITHUB_TOKEN=ghp_your_token_here

Usage

git-blame-blame <file:line> [options]
git-blame-blame <tracked-path> --bus-factor
git-blame-blame <tracked-path> --export csv

Examples

$ git-blame-blame src/auth.js:42
src/auth.js:42
  Line: "return token === undefined ? guest : user"

  Commit:   abc1234 by alice <[email protected]> (2024-03-15)
  Subject:  fix: handle unauthenticated users

  PR #234:  "fix: handle unauthenticated users"
  URL:      https://github.com/org/repo/pull/234

  Approved: bob, carol
$ git-blame-blame src/auth.js:42 --json
{
  "file": "src/auth.js",
  "line": 42,
  "lineContent": "return token === undefined ? guest : user",
  "commit": {
    "sha": "abc1234...",
    "shortSha": "abc1234",
    "authorName": "alice",
    "authorEmail": "[email protected]",
    "date": "2024-03-15",
    "subject": "fix: handle unauthenticated users"
  },
  "pr": {
    "number": 234,
    "title": "fix: handle unauthenticated users",
    "url": "https://github.com/org/repo/pull/234"
  },
  "approvals": [
    { "login": "bob", "email": null },
    { "login": "carol", "email": null }
  ]
}
$ git-blame-blame src/ --bus-factor
Bus Factor Analysis:

Critical (bus factor = 1):
  src/core/engine.ts      only alice maintains this (847 lines)

At Risk (bus factor = 2):
  src/api/routes.ts       carol 60% + alice 40%

Healthy (bus factor >= 3):
  src/utils/helpers.ts    alice 40%, bob 35%, carol 25%

Overall repo bus factor: 1
Recommendation: alice is the single point of failure for 1 file
$ git-blame-blame src/ --export csv > blame-report.csv
$ git-blame-blame src/ --export json > blame-report.json

Options

| Flag | Description | |------|-------------| | -t, --token <token> | GitHub personal access token (overrides GITHUB_TOKEN) | | -r, --repo <owner/repo> | GitHub repository (auto-detected from git remote if omitted) | | --json | Output results as JSON | | --since <date> | Limit tracked-path analysis to code added or modified since this date | | --team <file> | Show tracked-path contributions grouped by a team roster | | --bus-factor | Show per-file bus factor using contributors with more than 20% of blamed lines | | --export <csv|json> | Export tracked-path blame analysis as structured data | | -V, --version | Show version number | | -h, --help | Show help |

How it works

git-blame-blame runs a 4-step pipeline:

  1. git blame — Runs git log -L on the specified file and line to identify the commit that introduced that line of code.
  2. Find commit — Looks up the commit SHA in your repository to get author info, date, and commit message.
  3. Find PR — Queries the GitHub API to find which pull request contains that commit.
  4. Get approvals — Fetches all reviews for that PR and returns the list of approvers.

Development

# Clone and install
git clone https://github.com/yourusername/git-blame-blame
cd git-blame-blame
pnpm install

# Run in dev mode
pnpm dev src/auth.js:42

# Build
pnpm build

VS Code Extension

A minimal VS Code extension scaffold lives in vscode/.

See vscode/README.md for setup and usage instructions.

License

MIT