Dashboards

Engineering Metrics Dashboard From the GitHub Data You Already Have

11 min read

An engineering metrics dashboard should tell a team one thing: is work flowing from idea to production, and is it staying there? Not who wrote the most code, and not how busy everyone looks. This page covers which engineering metrics earn a place on that dashboard, what the four DORA metrics actually measure, and how to build the board from the GitHub data you already have: deploys, pull requests and CI runs.

The examples call the GitHub REST API from a small endpoint in your own backend. dashboardbase renders what it returns. There's no GitHub app to install on our side and no token of yours on our servers.

What belongs on an engineering metrics dashboard?

Six numbers. The first four are the DORA metrics, from the research program behind the State of DevOps reports. They've become the common language for software delivery because they measure outcomes of the whole system, not individual effort:

  • Deployment frequency. How often you ship to production. More, smaller deploys mean each one is less risky.
  • Lead time for changes. How long a change takes from commit to production. Most teams start with PR cycle time (opened to merged) as a proxy, because GitHub has it directly.
  • Change failure rate. The share of deploys that cause a failure in production: a rollback, a hotfix or an incident.
  • Time to restore service. How long it takes to recover when one does. Newer DORA reports call it failed deployment recovery time.

Two more make the board useful day to day:

  • Pull requests waiting for review. The most common place work stalls, and the one a team can fix today.
  • CI pass rate on the main branch. A flaky or broken pipeline slows every one of the numbers above.

The first two move every day. Change failure rate and time to restore move with incidents, so a weekly or monthly view is enough.

What to leave off

  • Anything per person. Commits, lines of code or PRs per developer turn a team dashboard into a leaderboard, and people start optimising the number instead of the work. Every metric here is team-level on purpose.
  • Lines of code. More code isn't more value. Sometimes the best PR of the week deletes 2,000 lines.
  • Story points and velocity. They're estimates the team made up. They're useful for planning inside the team and meaningless on a shared screen.
  • Raw commit counts. They depend on how people like to commit, not on how fast work ships.

The widget layout

  • Contributions grid for deploys per day. It shows rhythm at a glance: steady daily deploys, or bursts before a release and silence after.
  • KPI tile for PR cycle time, with a badge against last week.
  • Gauge for CI pass rate on main, out of 100 %.
  • Table for the pull requests waiting for review, oldest first, each linking to the PR.
  • KPI tiles for change failure rate and time to restore, if you track incidents.

It's a good board for the office TV: readable from across the room, and boring when things are healthy.

Prerequisites

  • A GitHub repository, and a deploy workflow in GitHub Actions (the examples assume it's called deploy.yml)
  • A read-only token: a fine-grained personal access token with read access to Actions, Pull requests and Metadata on that repository, or better, a GitHub App installation token for anything shared
  • A backend you can deploy an endpoint to (Node.js 18 or later here, for the built-in fetch)
  • A dashboardbase account

Every route below shares this helper:

import express from 'express'

const app = express()

const OWNER = 'your-org'
const REPO = 'your-repo'

async function github(path) {
  const response = await fetch(`https://api.github.com${path}`, {
    headers: {
      Accept: 'application/vnd.github+json',
      Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
      'X-GitHub-Api-Version': '2022-11-28',
    },
  })
  if (!response.ok) throw new Error(`GitHub ${response.status} for ${path}`)
  return response.json()
}

const daysAgo = (days) => new Date(Date.now() - days * 86400000).toISOString().slice(0, 10)

Step 1: Deploys per day **

The contributions grid takes one cell per day, with a date and a value:

response.jsondashboard.yourcompany.com/s/revenue
{
  "title": "Deploys",
  "actions": [
    {
      "title": "Open workflow",
      "type": "link",
      "url": "https://github.com/your-org/your-repo/actions/workflows/deploy.yml"
    }
  ],
  "data": {
    "header": {
      "title": "31",
      "subtitle": "Last 14 days",
      "badge": {
        "text": "+19%",
        "icon": "ArrowUp",
        "color": "Success"
      }
    },
    "cells": [
      { "date": "2026-11-05", "value": 3 },
      { "date": "2026-11-06", "value": 2 },
      { "date": "2026-11-07", "value": 4 },
      { "date": "2026-11-08", "value": 0 },
      { "date": "2026-11-09", "value": 0 },
      { "date": "2026-11-10", "value": 3 },
      { "date": "2026-11-11", "value": 2 },
      { "date": "2026-11-12", "value": 5 },
      { "date": "2026-11-13", "value": 1 },
      { "date": "2026-11-14", "value": 2 },
      { "date": "2026-11-15", "value": 0 },
      { "date": "2026-11-16", "value": 0 },
      { "date": "2026-11-17", "value": 4 },
      { "date": "2026-11-18", "value": 5 }
    ]
  }
}

Paste it into the free endpoint validator to see the grid, no account needed. You don't have to write these endpoints by hand: the free dashboardbase Skill teaches Claude Code or Cursor the contract, and the in-app editor generates a prompt for whatever AI tool you already use.

The data comes from the workflow runs API, filtered to successful runs of the deploy workflow. One request covers four weeks: the last 14 days for the grid, and the 14 before for the badge.

app.get('/dashboard/deploys', async (req, res) => {
  const runs = []
  for (let page = 1; page <= 5; page++) {
    const body = await github(
      `/repos/${OWNER}/${REPO}/actions/workflows/deploy.yml/runs` +
        `?status=success&created=>=${daysAgo(28)}&per_page=100&page=${page}`
    )
    runs.push(...body.workflow_runs)
    if (body.workflow_runs.length < 100) break
  }

  const perDay = new Map()
  for (let i = 13; i >= 0; i--) perDay.set(daysAgo(i), 0)

  let previous = 0
  for (const run of runs) {
    const day = run.created_at.slice(0, 10)
    if (perDay.has(day)) perDay.set(day, perDay.get(day) + 1)
    else if (day < daysAgo(13)) previous++
  }

  const current = [...perDay.values()].reduce((sum, n) => sum + n, 0)
  const change = previous === 0 ? 0 : Math.round(((current - previous) / previous) * 100)

  res.json({
    title: 'Deploys',
    actions: [
      {
        title: 'Open workflow',
        type: 'link',
        url: `https://github.com/${OWNER}/${REPO}/actions/workflows/deploy.yml`,
      },
    ],
    data: {
      header: {
        title: String(current),
        subtitle: 'Last 14 days',
        badge: {
          text: `${change >= 0 ? '+' : ''}${change}%`,
          icon: change >= 0 ? 'ArrowUp' : 'ArrowDown',
          color: change >= 0 ? 'Success' : 'Danger',
        },
      },
      cells: [...perDay].map(([date, value]) => ({ date, value })),
    },
  })
})

If you deploy from somewhere other than GitHub Actions, the same widget works from your deploy tool's API or from a deploys table you write to at the end of every release.

Step 2: PR cycle time **

response.jsondashboard.yourcompany.com/s/revenue
{
  "title": "PR cycle time",
  "actions": [
    {
      "title": "Merged PRs",
      "type": "link",
      "url": "https://github.com/your-org/your-repo/pulls?q=is%3Apr+is%3Amerged"
    }
  ],
  "data": {
    "header": {
      "title": "19h",
      "subtitle": "Median, opened to merged, last 7 days",
      "badge": {
        "text": "-6h",
        "icon": "ArrowDown",
        "color": "Success"
      }
    }
  }
}

The search API returns merged pull requests in a date range, each with created_at and pull_request.merged_at. Use the median, not the mean: one PR that sat open for a month would swamp the average.

async function medianCycleHours(from, to) {
  const q = `repo:${OWNER}/${REPO} is:pr is:merged merged:${from}..${to}`
  const body = await github(`/search/issues?q=${encodeURIComponent(q)}&per_page=100`)
  const hours = body.items
    .map((pr) => (new Date(pr.pull_request.merged_at) - new Date(pr.created_at)) / 3600000)
    .sort((a, b) => a - b)
  if (hours.length === 0) return 0
  const mid = Math.floor(hours.length / 2)
  return hours.length % 2 ? hours[mid] : (hours[mid - 1] + hours[mid]) / 2
}

app.get('/dashboard/pr-cycle-time', async (req, res) => {
  const now = Math.round(await medianCycleHours(daysAgo(7), daysAgo(0)))
  const before = Math.round(await medianCycleHours(daysAgo(14), daysAgo(8)))
  const delta = now - before

  res.json({
    title: 'PR cycle time',
    actions: [
      {
        title: 'Merged PRs',
        type: 'link',
        url: `https://github.com/${OWNER}/${REPO}/pulls?q=is%3Apr+is%3Amerged`,
      },
    ],
    data: {
      header: {
        title: `${now}h`,
        subtitle: 'Median, opened to merged, last 7 days',
        badge: {
          text: `${delta > 0 ? '+' : delta < 0 ? '-' : ''}${Math.abs(delta)}h`,
          icon: delta > 0 ? 'ArrowUp' : 'ArrowDown',
          color: delta > 0 ? 'Danger' : 'Success',
        },
      },
    },
  })
})

Note the colours: for cycle time, down is good.

Step 3: CI pass rate on main **

response.jsondashboard.yourcompany.com/s/revenue
{
  "title": "CI pass rate",
  "actions": [
    {
      "title": "View runs",
      "type": "link",
      "url": "https://github.com/your-org/your-repo/actions?query=branch%3Amain"
    }
  ],
  "data": {
    "header": {
      "title": "94%",
      "subtitle": "main, last 7 days"
    },
    "value": {
      "value": 94,
      "postfix": "%"
    },
    "maxValue": 100
  }
}

Count completed runs on main by conclusion. Leave out cancelled and skipped runs: a run someone cancelled didn't pass or fail.

app.get('/dashboard/ci-pass-rate', async (req, res) => {
  const body = await github(
    `/repos/${OWNER}/${REPO}/actions/runs?branch=main&status=completed&created=>=${daysAgo(7)}&per_page=100`
  )
  const passed = body.workflow_runs.filter((run) => run.conclusion === 'success').length
  const failed = body.workflow_runs.filter((run) => run.conclusion === 'failure').length
  const rate = passed + failed === 0 ? 100 : Math.round((passed / (passed + failed)) * 100)

  res.json({
    title: 'CI pass rate',
    actions: [
      {
        title: 'View runs',
        type: 'link',
        url: `https://github.com/${OWNER}/${REPO}/actions?query=branch%3Amain`,
      },
    ],
    data: {
      header: { title: `${rate}%`, subtitle: 'main, last 7 days' },
      value: { value: rate, postfix: '%' },
      maxValue: 100,
    },
  })
})

Step 4: Pull requests waiting for review **

response.jsondashboard.yourcompany.com/s/revenue
{
  "title": "Waiting for review",
  "actions": [
    {
      "title": "All open PRs",
      "type": "link",
      "url": "https://github.com/your-org/your-repo/pulls"
    }
  ],
  "data": {
    "columns": [
      { "text": "Pull request", "width": 55 },
      { "text": "Author", "width": 25 },
      { "text": "Waiting", "width": 20 }
    ],
    "rows": [
      [
        { "text": "Retry failed webhooks with backoff", "link": "https://github.com/your-org/your-repo/pull/412" },
        { "text": "ana" },
        { "text": "4 days", "badge": { "text": "4 days", "color": "Danger" } }
      ],
      [
        { "text": "Paginate the audit log export", "link": "https://github.com/your-org/your-repo/pull/419" },
        { "text": "sam" },
        { "text": "1 day", "badge": { "text": "1 day", "color": "Warning" } }
      ]
    ]
  }
}

One search, oldest first. review:required matches PRs whose required reviews haven't been given yet, and draft:false leaves out work that isn't ready:

app.get('/dashboard/waiting-for-review', async (req, res) => {
  const q = `repo:${OWNER}/${REPO} is:pr is:open draft:false review:required`
  const body = await github(`/search/issues?q=${encodeURIComponent(q)}&sort=created&order=asc&per_page=8`)

  const rows = body.items.map((pr) => {
    const days = Math.floor((Date.now() - new Date(pr.created_at)) / 86400000)
    const waiting = days === 0 ? 'Today' : `${days} day${days === 1 ? '' : 's'}`
    return [
      { text: pr.title, link: pr.html_url },
      { text: pr.user.login },
      { text: waiting, badge: { text: waiting, color: days >= 3 ? 'Danger' : days >= 1 ? 'Warning' : 'Success' } },
    ]
  })

  res.json({
    title: 'Waiting for review',
    actions: [
      {
        title: 'All open PRs',
        type: 'link',
        url: `https://github.com/${OWNER}/${REPO}/pulls`,
      },
    ],
    data: {
      columns: [
        { text: 'Pull request', width: 55 },
        { text: 'Author', width: 25 },
        { text: 'Waiting', width: 20 },
      ],
      rows,
    },
  })
})

review:required only works if branch protection requires reviews. Without that, use review:none for PRs nobody has reviewed yet.

Change failure rate and time to restore

GitHub can't tell you these two on its own, because it doesn't know which deploys broke production. You need a record of incidents: an incident tool, a #incidents channel you log from, or a table with a row per incident holding the deploy that caused it, when it started and when it was resolved.

With that, both are one query each: failed deploys divided by all deploys over the last 30 days, and the median of resolved_at - started_at. Each goes on a KPI tile with a badge against the previous 30 days. If you don't record incidents yet, start there before you add the tiles. A number you estimate by hand is worse than no number.

Securing the endpoints

Who may call them. dashboardbase sends your workspace's Endpoint Secret as an x-dashboardbase-secret header on every request. Reject requests without it with a 401, and fail at startup if the environment variable is missing. The Postgres dashboard guide has the full middleware.

What the token may do. Give the endpoint its own read-only token, scoped to the repositories on the board. A GitHub App installation token is better than a personal one for anything shared: it isn't tied to one person's account and it expires on its own.

Common gotchas

  • Rate limits. The search API allows far fewer requests per minute than the rest of the REST API. Cache each response for a few minutes; nobody needs cycle time to the second.
  • Pagination. List endpoints return at most 100 items per page. The deploys route pages through them; a busy repository needs more pages, or a narrower date range.
  • Search results cap at 1,000. Fine for one team's week of PRs, not for a year of a monorepo. For long ranges, store the numbers daily and chart your own table.
  • Time zones. The API's timestamps are UTC, so "today" in the grid starts at midnight UTC. Shift the dates if your team is far from it.
  • Bots. Dependency-update PRs merge fast and can make cycle time look great. Add -author:app/dependabot (or your bot's name) to the search query.

Engineering-intelligence tools vs building it

Dedicated engineering-intelligence platforms such as Swarmia, LinearB and DX connect to GitHub and your issue tracker and give you these metrics out of the box, along with things this page doesn't do: benchmarks, investment breakdowns across projects, developer surveys. If you want those, or you're reporting across many teams, one of them is the better call.

This page is for the smaller case: one team, a handful of numbers, on a screen everyone can see, without another tool that needs read access to all your code. Four routes and a token with read-only scopes is the whole setup.

FAQ

What are the four DORA metrics? Deployment frequency, lead time for changes, change failure rate and time to restore service (newer DORA reports call the last one failed deployment recovery time). Together they measure how fast and how safely a team ships.

What should an engineering metrics dashboard show? Team-level flow and stability: deploys, PR cycle time, CI pass rate, reviews waiting, and, if you track incidents, change failure rate and time to restore. Nothing per person.

Can I build a DORA metrics dashboard from GitHub alone? Deployment frequency and a lead-time proxy, yes, from Actions runs and pull requests. Change failure rate and time to restore need a record of incidents as well.

Should engineering metrics be tracked per developer? No. Per-person numbers get gamed and say little about delivery. Keep the board at team level.

Next steps

  • Start with deploys and reviews waiting, the two that move every day, and add the rest once they're on screen.
  • If the team runs an API, put its health next to these numbers: the API monitoring dashboard covers status, error rate and latency.
  • Deciding what else earns a tile? What belongs on a KPI dashboard has a four-question test.

About the third-party code **

The examples were written against GitHub's public REST API documentation (API version 2022-11-28). Endpoints, search qualifiers and rate limits can change after we publish, so check them against GitHub's REST API reference before you rely on them.

Your first dashboard in ten minutes

Return JSON from an endpoint you already own. We handle the charts, hosting, sharing and the mobile app — free for 14 days.