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

@groundbreaker/github-cycle-time

v0.0.2

Published

Calculates Reaction/Lead/Cycle Time metrics from your GitHub issues.

Readme

@groundbreaker/github-cycle-time Build Status

Calculates Reaction/Lead/Cycle Time from your Organization's GitHub issues.

Getting Started

Add as a dependency to your project:

yarn add @groundbreaker/github-cycle-time

or

npm install @groundbreaker/github-cycle-time

Usage

Creating an instance of CycleTime

const CycleTime = require('@groundbreaker/github-cycle-time');

// assuming you have stored your configuration in the environment...
service = new CycleTime({ org: process.env.GITHUB_ORG, token: process.env.GITHUB_TOKEN });

Options

  • org (string) - Github Organization name. Required
  • token (string) - Github Personal Access Token. Required
  • baseUrl (string) - Github API Base URL. Defaults to https://api.github.com. Optional
  • cache (blob-store) - An object that implements the abstract-blob-store API. Defaults to MemBlobs, an in-memory reference implementation that ships with abstract-blob-store. You will get better results with fs-blob-store, s3-blob-store, or one of the other blob-store implementations.

API

CycleTime#tickets(since)

This provides access to all of the tickets in your organization, summarized with event timestamps, and cycle durations. Must be called with a ISO8601 timestamp string argument, which filters issues that were created on or after this date. This method returns a Promise, and must be used with then() or async/await.

Example

const CycleTime = require('@groundbreaker/github-cycle-time');
service = new CycleTime({ org: process.env.GITHUB_ORG, token: process.env.GITHUB_TOKEN });

service.tickets('2018-08-01T00:00:00Z')
.then((data) => {
  // do something with data
  console.log(data);
})
.catch((error) => {
  console.error(error);
});

Return Value

[
  {
    id: 1,
    opened: '1978-01-13T09:11:00Z',
    assigned: '1978-01-14T09:11:00Z',
    closed: '1978-01-16T09:11:00Z',
    reopened: '1978-01-15T09:11:00Z',
    reaction_time: 86400,
    cycle_time: 172800,
    lead_time: 259200
  }
]
  • All dates are ISO 8601 strings, in the UTC timezone.
  • All durations are in seconds, and may be expressed as decimals.
  • Some events may have a null value, e.g. closed is null because the issue is still open.

CycleTime#metrics(since)

This provides an aggregation of the cycle durations for all the tickets in your organization returned by CycleTime#tickets(since). Must be called with a ISO8601 timestamp string argument, which filters issues that were created on or after this date. This method returns a Promise, and must be used with then() or async/await.

const CycleTime = require('@groundbreaker/github-cycle-time');
service = new CycleTime({ org: process.env.GITHUB_ORG, token: process.env.GITHUB_TOKEN });

service.metrics('2018-08-01T00:00:00Z')
.then((data) => {
  // do something with data
  console.log(data);
})
.catch((error) => {
  console.error(error);
});

Return Value

{
  org: 'groundbreaker',
  reaction_time_mean: 8,
  reaction_time_median: 8,
  reaction_time_mean_human: '0.1M',
  reaction_time_median_human: '0.1M',
  cycle_time_mean: 8024878,
  cycle_time_median: 8024878,
  cycle_time_mean_human: '13W 1D 21H 8.0M',
  cycle_time_median_human: '13W 1D 21H 8.0M',
  lead_time_mean: 8024886,
  lead_time_median: 8024886,
  lead_time_mean_human: '13W 1D 21H 8.1M',
  lead_time_median_human: '13W 1D 21H 8.1M'
}
  • All durations are in seconds, and may be expressed as decimals.
  • All *_mean values are straight averages, and should be interpreted as the effective cycle times.
  • All *_median values find the middle value, effectively throwing away outliers, and should be seens as the typical cycle times.
  • All *_human values are formatted duration strings, with weeks (W) as the largest unit of measure, and minutes (M) as the smallest unit of measure. Units with a 0 value are not shown in the output.

Meta