# GitHub CI Monitor — DORA Metrics & Workflow Analytics (`gochujang/github-ci-monitor`) Actor

Monitor GitHub Actions CI/CD workflow runs, build success rates, average duration, and failure patterns across repositories. Track deployment frequency, lead time, and DORA metrics. Uses GitHub public API. Optional GitHub token for higher rate limits and private repos.

- **URL**: https://apify.com/gochujang/github-ci-monitor.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 item trackeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does GitHub CI Monitor do?

**GitHub CI monitor** collects completed GitHub Actions workflow run data across any number of repositories and computes four DORA metrics — **Deployment Frequency**, **Change Failure Rate**, **Mean Time to Recovery (MTTR)**, and success rate — alongside timing statistics (average, min, and max run duration). This **GitHub Actions tracker** works on public repositories without a token, and supports private repositories with a GitHub Personal Access Token. Use it to power engineering dashboards, benchmark open-source project health, and automate **CI/CD pipeline status** reporting.

One structured record is produced per repository-workflow combination, covering a configurable lookback window of up to 90 days.

### Why use GitHub CI Monitor?

- **Engineering dashboards** — aggregate **CI/CD pipeline status** across your entire GitHub organization into a single structured dataset; feed it into Grafana, Metabase, or any BI tool.
- **DORA metrics reporting** — compute Deployment Frequency, Change Failure Rate, and MTTR automatically from raw workflow history without manually exporting GitHub data.
- **Flaky workflow detection** — identify workflows with consistently high failure rates or extreme duration variance to prioritize pipeline reliability work.
- **Open-source health monitoring** — benchmark popular open-source repositories against their **GitHub Actions tracker** data to evaluate project maturity and CI discipline.
- **Scheduled trend tracking** — run weekly to build a time-series of CI health, surfacing degradations in success rate or rising MTTR before they become incidents.

### How to use GitHub CI Monitor

1. Open the actor on Apify and click **Try for free**.
2. In the **Input** tab, add one or more GitHub repository slugs (e.g. `["microsoft/vscode", "facebook/react"]`).
3. Optionally paste a GitHub Personal Access Token to unlock private repos and raise the rate limit from 60 to 5,000 requests/hour.
4. Set `lookbackDays` (default 30, max 90) and an optional `workflowFilter` substring to focus on specific workflows.
5. Click **Start** — each repository-workflow combination produces one output record.
6. Export as JSON or CSV, or stream results via the Apify API into your dashboard pipeline.

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `repositories` | `string[]` | Yes | — | GitHub repo slugs to monitor (e.g. `"microsoft/vscode"`) |
| `githubToken` | `string` | No | — | GitHub Personal Access Token — raises rate limit to 5,000 req/hr and enables private repos |
| `lookbackDays` | `integer` | No | `30` | Days of history to analyze (max 90) |
| `workflowFilter` | `string` | No | — | Case-insensitive name substring to filter workflows (e.g. `"CI"`) |

Example input:

```json
{
  "repositories": ["microsoft/vscode", "facebook/react"],
  "lookbackDays": 30,
  "workflowFilter": "CI"
}
```

### Output

One record per repository + workflow combination:

```json
[
  {
    "repo": "microsoft/vscode",
    "workflow_id": 12345678,
    "workflow_name": "CI",
    "workflow_path": ".github/workflows/ci.yml",
    "period_days": 30,
    "total_runs": 142,
    "success_runs": 131,
    "failure_runs": 9,
    "cancelled_runs": 2,
    "success_rate_pct": 92.3,
    "change_failure_rate_pct": 6.3,
    "avg_duration_minutes": 8.42,
    "min_duration_minutes": 3.11,
    "max_duration_minutes": 24.7,
    "deployment_frequency_per_day": 4.37,
    "mean_time_to_recovery_hours": 1.25,
    "last_run_status": "success",
    "last_run_at": "2026-08-31T14:22:10Z"
  }
]
```

### Data fields

| Field | Type | Description |
|---|---|---|
| `repo` | string | Repository slug (owner/name) |
| `workflow_id` | integer | GitHub workflow ID |
| `workflow_name` | string | Workflow display name |
| `workflow_path` | string | Path to the workflow YAML file |
| `period_days` | integer | Lookback window in days |
| `total_runs` | integer | All completed runs in the period |
| `success_runs` | integer | Runs with `success` conclusion |
| `failure_runs` | integer | Runs with `failure` conclusion |
| `cancelled_runs` | integer | Runs with `cancelled` conclusion |
| `success_rate_pct` | float | Percentage of runs that succeeded |
| `change_failure_rate_pct` | float | DORA Change Failure Rate (% of failure runs) |
| `avg_duration_minutes` | float | Mean duration of all runs |
| `min_duration_minutes` | float | Fastest run duration |
| `max_duration_minutes` | float | Slowest run duration |
| `deployment_frequency_per_day` | float | DORA Deployment Frequency (successful runs/day) |
| `mean_time_to_recovery_hours` | float | DORA MTTR — avg hours from failure to next success |
| `last_run_status` | string | Conclusion of the most recent run |
| `last_run_at` | ISO8601 | Timestamp of the most recent run |

### Cost estimation

Pricing is **Pay-Per-Event (PPE)** — charged per workflow record produced.

| Workflow records | Cost |
|---|---|
| 5 repos × 3 workflows = 15 | $0.045 |
| 20 repos × 5 workflows = 100 | $0.30 |
| 50 repos × 10 workflows = 500 | $1.50 |

### FAQ

**Do I need a GitHub token?**
No — public repositories work without a token, though the unauthenticated rate limit is 60 requests/hour. For large organizations or private repositories, add a GitHub Personal Access Token with `repo` scope to raise the limit to 5,000 requests/hour.

**What counts as a "completed" run?**
Only runs with `status=completed` are fetched. Queued and in-progress runs are excluded. Cancelled runs are counted in `total_runs` but not in `success_runs` or `failure_runs`.

**How is MTTR calculated?**
For each `failure` run, the actor finds the chronologically next `success` run in the same workflow and measures the elapsed time. MTTR is the average across all such pairs in the lookback window.

***

> **Disclaimer:** This actor uses the public GitHub REST API. Data reflects completed workflow runs within the specified lookback window and depends on GitHub API availability. DORA metrics are computed from workflow run history and are approximate indicators, not exact operational measurements.

***

### Related actors

- [GitHub Repo Stats](https://apify.com/gochujang/github-repo-stats) — Stars, forks, contributor count for the same repos you're monitoring CI health on
- [GitHub Trending Tracker](https://apify.com/gochujang/github-trending-tracker) — Rising repos to discover new projects whose CI practices you can benchmark against
- [Docker Hub Image Tracker](https://apify.com/gochujang/docker-hub-tracker) — Container image pull trends to pair with CI deployment frequency data

### Feedback

If this actor helps your DevOps analytics, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/github-ci-monitor#reviews)

***

**Keywords:** GitHub Actions monitor, CI/CD analytics, build success rate, workflow tracker, DORA metrics, deployment frequency, GitHub CI analytics, lead time, GitHub Actions scraper, devops metrics, build failure patterns, GitHub automation, CI monitoring

# Actor input Schema

## `repositories` (type: `array`):

GitHub repositories to monitor (e.g. \['microsoft/vscode', 'facebook/react'])

## `githubToken` (type: `string`):

Optional GitHub personal access token for higher API rate limits (5000/hr vs 60/hr)

## `lookbackDays` (type: `integer`):

Number of days of workflow history to analyze

## `workflowFilter` (type: `string`):

Only analyze workflows whose name contains this string (case-insensitive). Leave empty for all workflows.

## `alertOnStatus` (type: `array`):

Send a Telegram alert when any workflow run has one of these conclusion statuses.

## `telegramBotToken` (type: `string`):

Telegram bot token for sending CI failure alerts. Leave empty to skip Telegram notifications.

## `telegramChatId` (type: `string`):

Telegram chat ID to send CI failure alerts to. Can be a user ID or group/channel ID.

## Actor input object example

```json
{
  "repositories": [
    "microsoft/vscode",
    "facebook/react"
  ],
  "lookbackDays": 7,
  "alertOnStatus": [
    "failure",
    "error"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "repositories": [
        "microsoft/vscode",
        "facebook/react"
    ],
    "lookbackDays": 7
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/github-ci-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "repositories": [
        "microsoft/vscode",
        "facebook/react",
    ],
    "lookbackDays": 7,
}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/github-ci-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "repositories": [
    "microsoft/vscode",
    "facebook/react"
  ],
  "lookbackDays": 7
}' |
apify call gochujang/github-ci-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/github-ci-monitor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ATifeLTMSROXx4wk8/builds/NDWbWRObdhbwSfu8g/openapi.json
