PR Cycle Time — Optimal Docs

PR Cycle Time | Measure How Fast Code Moves from First Commit to Merge

The PR Cycle Time page gives teams a clear view of how long it takes code to move from first commit to merge. It’s the fastest way to identify where review bottlenecks occur and how efficiently work flows through GitHub.

Where to Find It

Go to Velocity → PR Cycle Time in the left sidebar.

How It Works

Once you’ve connected GitHub (and optionally Jira), PR Cycle Time begins tracking all merged and open pull requests across repositories. Each PR is broken into measurable stages:

Each card updates continuously as events stream in from GitHub. Averages and medians can be viewed for any selected range, repository, or team.

Filters and Controls

Teams / Individuals Selector

Toggle between organization, team, or individual views.

💡 Pro Tip: Use team-based analysis for sprint retrospectives and individual filters to spot review bottlenecks.

Repositories

The All Repositories dropdown narrows your metrics to one or more connected GitHub repositories.

💡 Pro Tip: Combine related repos (e.g., optibot-be and optibot-fe) to evaluate cross-service performance.

Date Range Picker

💡 Pro Tip: Use weekly ranges for sprint retros, and monthly or quarterly windows to track long-term efficiency.

Branch / Staging Filter

The Branch time to merge policy modal defines which branches count as staging or deployment targets, powering the Merged to Staging metric.

  1. Click the ➕ icon beside Merged to Staging on the dashboard.
  2. Under Label, name your policy (e.g., “Staging,” “Production,” or “Feature”).
  3. Under Select branch(es), pick one or more GitHub branches to include.
  4. Under Select Team(s), optionally scope this to specific teams.
  5. Click Save.

💡 Pro Tip: Create multiple merge policies (for example, staging and main) to compare deployment speeds between environments.

AI Insight

Click AI Insight to open a contextual analysis sidebar:

Search & Sorting Controls (Table View)

Below the main metric cards, the PR Table includes:

Pro Tips

Troubleshooting

Issue Fix
Missing PRs? Ensure the repository is connected and synced
No data for ‘Merged to Staging’? Assign which branches count as staging in settings
Unexpectedly low ‘In Review’ times? Automated reviews by Optibot are included; filter them out for human-only review times
Check Failure Rate = 0%? Confirm CI checks are enabled in your GitHub workflow