# Dependency Bot Backlog and Degradation Ledger (`kingii98/dependency-bot-backlog-and-degradation-ledger`) Actor

Reads the public dependency dashboard issue of each repository, and reports the declared repository problems, the size of each backlog section, and the change since the last run. One row for each repository, one row for each new problem and each backlog g

- **URL**: https://apify.com/kingii98/dependency-bot-backlog-and-degradation-ledger.md
- **Developed by:** [kingii98](https://apify.com/kingii98) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 dashboard repository reads

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

## Dependency Bot Backlog and Degradation Ledger from Dashboard Issues

A dependency update bot writes one dashboard issue in each repository that it serves. That issue
declares the problems of the repository, and it lists the updates that wait: pending approval,
awaiting schedule, pending status checks, group size not met, abandoned dependencies, and open
errors. The issue is public, but it is visible only inside its repository.

This Actor reads the dashboard issue of up to 250 repositories in one run, and gives one table:
the dashboard URL, the last dashboard update, the days since that update, the declared problems,
the size of each backlog section, and the change of each number against the baseline of the last
run. It shows, in one place, where the bot is degraded and where the backlog grows.

HTTP only. GitHub REST search and issue endpoints. No browser, no proxy, no database, and no
token for a small fleet.

### What the Actor does

For each repository:

1. It searches the open issues for the dashboard title (one REST search call).
2. It keeps the issue whose body reads as a dependency dashboard. An issue with a similar title
   but another body is never reported. When the search answer holds no body, the Actor reads that
   issue with one extra call.
3. It parses the body: the declared problems under `Repository Problems`, and the item count of
   each backlog section. The parser reads the task list items, then the count in a `<details>`
   summary line, then the rows of a table, and last the plain bullet lines, so a section keeps its
   count when the bot changes the shape of the list.
4. It compares the problems and the counts against the baseline in the named key-value store, and
   writes one row for each new problem and for each backlog section that grew.
5. It writes the new baseline, but only after the rows of the repository are written.

The first run of a repository writes the baseline and reports no change. Every later run gives
the delta.

### Input

| Field | Type | Default | Meaning |
| --- | --- | --- | --- |
| `repositories` | array | 3 public example repositories | 1 to 250 public repositories, as `owner/repo` or as `https://github.com/owner/repo`. A value that is not a public GitHub repository becomes an `invalid-target` row. The run does not fail. |
| `dashboardIssueTitle` | string | `Dashboard` | A phrase that the title of the dashboard issue holds. Use `Dependency Dashboard` for the standard title, or a shorter phrase when your bot renames the issue. |
| `backlogAgeThresholdDays` | integer | `7` | A dashboard with no update for more days than this value is reported as stale, which shows that the bot did not serve the repository. |
| `growthThreshold` | integer | `1` | The smallest growth of one backlog section that becomes a change event. |
| `githubToken` | string (secret) | none | Optional read-only token. Without a token the Actor uses the anonymous GitHub limit, which other users of the same IP address can share. |
| `stateStoreName` | string | `dependency-dashboard-ledger-state` | The named key-value store that holds the baseline of each repository. Runs with the same name share the baseline. |
| `timeoutSeconds` | integer | `20` | Timeout of one GitHub API call. |
| `maxResponseBytes` | integer | `4000000` | Hard cap on the bytes read from one answer. |

Every field has a default, so a run with empty input `{}` works.

### Output

One dataset row for each repository, one row for each detected change, one row for each invalid
input value, and one summary row at the end.

#### Repository row

`recordType` is `repository`.

| Field | Meaning |
| --- | --- |
| `repository` | The `owner/repo` value. |
| `status` | `OK` for a dashboard that was read. |
| `dashboardUrl`, `issueNumber`, `dashboardTitle` | The dashboard issue. |
| `lastDashboardUpdate`, `daysSinceUpdate` | The last update of the issue, and the age in days. |
| `dashboardStale` | True when the age passes `backlogAgeThresholdDays`. |
| `problems`, `problemCount` | The declared repository problems, with their severity. |
| `newProblems`, `resolvedProblems` | The problems that came and the problems that went, against the baseline. |
| `pendingApproval`, `awaitingSchedule`, `pendingStatusChecks`, `groupSizeNotMet`, `abandonedDependencies`, `openErrors` | The size of each backlog section. |
| `totalBacklog` | The sum of the six sections. |
| `pendingApprovalDelta`, `awaitingScheduleDelta`, `pendingStatusChecksDelta`, `groupSizeNotMetDelta`, `abandonedDependenciesDelta`, `openErrorsDelta`, `totalBacklogDelta` | The change against the baseline. `null` on the first run. |
| `baselineExisted` | False on the first run of the repository. |
| `bodyTruncated` | True when the bot truncated the dashboard body, so the counts can be lower than the true backlog. |
| `changeEvents`, `note`, `checkedAt` | The count of change rows, a readable note, and the time of the read. |

#### Change row

`recordType` is `change`. One row for each new problem (`changeType` `new-problem`) and for each
backlog section that grew (`changeType` `backlog-growth`), with `section`, `problem`, `severity`,
`previousCount`, `currentCount` and `delta`.

#### Summary row

`recordType` is `summary`, with `runStatus`, `dashboardsRead`, `declaredProblems`, `newProblems`,
`backlogGrowthEvents`, `changeEvents`, `staleDashboards`, `totalBacklog` and the note of the run.

### Business verdicts never fail the run

A repository without a dashboard, a repository that GitHub answers 404 for, a spent rate budget,
an invalid input value and a ledger with zero changes are all rows plus a status message. The run
ends SUCCEEDED. Only a real malfunction gives a FAILED run.

When the run stops early (`runStatus` is `partial`), the `stopReason` says why: `charge-limit`,
`rate-limited`, `token-rejected` or `request-limit`. The repositories that are left keep their
baseline, so the next run reads them and no change is lost.

### Charged events

The Actor uses pay-per-event pricing with two events:

| Event | Charged for | Count |
| --- | --- | --- |
| `dashboard-repository-read` | One dashboard issue that the Actor found and parsed | One for each repository with a dashboard. A repository without a dashboard, or one that GitHub cannot answer for, is never charged. |
| `problem-or-backlog-change-detected` | One new repository problem, or one backlog section that grew by `growthThreshold` or more | One for each such change. The first run of a repository writes the baseline and charges no change event. |

The Actor reads the maximum total charge that you set. When the limit cannot hold every change of
a repository, the Actor reports none of them, keeps the baseline of that repository, and stops
with `stopReason` `charge-limit`, so no change is charged twice and none is lost.

### Rate limits

Without a token GitHub allows few calls for each hour, and other users of the same IP address
share that budget. One repository needs one call, or two when the search answer holds no body.
For a fleet of many repositories, supply a read-only `githubToken`. When GitHub refuses a call,
the run stops with `rate-limited`, keeps every baseline, and the next run continues.

### Development

```
uv run pytest
uv run ruff check .
```

# Actor input Schema

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

1 to 250 public repositories, as owner/repo or as https://github.com/owner/repo. The Actor searches the open issues of each repository for the dashboard issue, and reads its body. It does not crawl.

## `dashboardIssueTitle` (type: `string`):

A phrase that the title of the dashboard issue holds. The Actor searches open issues with this phrase in the title, and keeps only an issue whose body reads as a dependency dashboard. Use "Dependency Dashboard" for the standard title, or a shorter phrase such as "Dashboard" when your bot renames the issue.

## `backlogAgeThresholdDays` (type: `integer`):

A dashboard with no update for more days than this value is reported as stale, which shows that the bot did not serve the repository.

## `growthThreshold` (type: `integer`):

The smallest growth of one backlog section, against the stored baseline, that becomes a change event and a charged event.

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

Optional. A read-only GitHub token that you own. Without a token, the Actor uses the anonymous GitHub limit, which other users of the same IP address can share. When GitHub refuses a call, the Actor reports RATE\_LIMITED and keeps the baseline. The Actor sends the token only to api.github.com and never writes it to the log or to the dataset.

## `stateStoreName` (type: `string`):

The named key-value store that keeps, for each repository, the problem set and the backlog counts of the last run. Runs that use the same name share the baseline. Letters, digits and hyphens.

## `timeoutSeconds` (type: `integer`):

Timeout for one call to the GitHub API.

## `maxResponseBytes` (type: `integer`):

Hard cap on the bytes read from one GitHub API answer. A larger answer is reported as an error for that repository.

## Actor input object example

```json
{
  "repositories": [
    "snyssen/mother-of-all-infra",
    "sebastka/homelab",
    "vrozaksen/home-ops"
  ],
  "dashboardIssueTitle": "Dashboard",
  "backlogAgeThresholdDays": 7,
  "growthThreshold": 1,
  "stateStoreName": "dependency-dashboard-ledger-state",
  "timeoutSeconds": 20,
  "maxResponseBytes": 4000000
}
```

# Actor output Schema

## `dataset` (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": [
        "snyssen/mother-of-all-infra",
        "sebastka/homelab",
        "vrozaksen/home-ops"
    ],
    "dashboardIssueTitle": "Dashboard",
    "backlogAgeThresholdDays": 7,
    "growthThreshold": 1,
    "stateStoreName": "dependency-dashboard-ledger-state",
    "timeoutSeconds": 20,
    "maxResponseBytes": 4000000
};

// Run the Actor and wait for it to finish
const run = await client.actor("kingii98/dependency-bot-backlog-and-degradation-ledger").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": [
        "snyssen/mother-of-all-infra",
        "sebastka/homelab",
        "vrozaksen/home-ops",
    ],
    "dashboardIssueTitle": "Dashboard",
    "backlogAgeThresholdDays": 7,
    "growthThreshold": 1,
    "stateStoreName": "dependency-dashboard-ledger-state",
    "timeoutSeconds": 20,
    "maxResponseBytes": 4000000,
}

# Run the Actor and wait for it to finish
run = client.actor("kingii98/dependency-bot-backlog-and-degradation-ledger").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": [
    "snyssen/mother-of-all-infra",
    "sebastka/homelab",
    "vrozaksen/home-ops"
  ],
  "dashboardIssueTitle": "Dashboard",
  "backlogAgeThresholdDays": 7,
  "growthThreshold": 1,
  "stateStoreName": "dependency-dashboard-ledger-state",
  "timeoutSeconds": 20,
  "maxResponseBytes": 4000000
}' |
apify call kingii98/dependency-bot-backlog-and-degradation-ledger --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kingii98/dependency-bot-backlog-and-degradation-ledger"
        }
    }
}
```

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/HL564MR6qBibnp2oO/builds/QUDocMyUKFCcNcWc8/openapi.json
