gh-velocity flow cycle-time#

Cycle time for an issue, PR, or bulk query

Synopsis#

Cycle time measures how long an issue or PR was actively worked on.

The measurement strategy is set in .gh-velocity.yml:

cycle_time: strategy: issue # work started → issue closed (default) strategy: pr # PR created → PR merged

The issue strategy detects "work started" from lifecycle config (project board status change). Configure lifecycle.in-progress for cycle time metrics.

Single mode: gh velocity cycle-time 42 gh velocity cycle-time --pr 99 Bulk mode: gh velocity cycle-time --since 30d [--until 2026-03-01]

The --pr flag overrides the configured strategy for a single run. When a signal is not available for an item, cycle time is N/A.

gh-velocity flow cycle-time [<issue>] [flags]

Examples#

  # Single issue (uses configured strategy)
  gh velocity flow cycle-time 42

  # Single PR (always uses PR created → merged)
  gh velocity flow cycle-time --pr 99

  # All issues closed in the last 30 days
  gh velocity flow cycle-time --since 30d

  # Remote repo, markdown output
  gh velocity flow cycle-time --since 14d -R cli/cli -f markdown

Options#

  -h, --help           help for cycle-time
      --pr int         Measure cycle time for a pull request instead of an issue
      --since string   Start of date window (YYYY-MM-DD, RFC3339, or Nd relative)
      --until string   End of date window (default: now)

Options inherited from parent commands#

      --config string   Path to config file (default: .gh-velocity.yml)
      --debug           Print diagnostic info to stderr
  -f, --format string   Output format: json, pretty, markdown (default "pretty")
      --new-post        Force a new post (skip idempotent update; implies --post)
      --post            Post output to GitHub (dry-run by default; set GH_VELOCITY_POST_LIVE=true for live)
  -R, --repo string     Repository in owner/name format
      --scope string    Additional GitHub search qualifier(s) ANDed with config scope

SEE ALSO#