Skip to content

botpress/docs-updater

Repository files navigation

Docs Updater

A Botpress ADK agent that listens for merged pull requests in your codebase and automatically opens PRs in your Mintlify documentation to reflect user-facing changes.

How it works

  1. A pull request is merged in your GitHub repository
  2. The agent receives a webhook event via the GitHub integration
  3. It analyzes the PR for user-facing changes
  4. If changes are detected, it creates a Mintlify agent job to update your docs

Prerequisites

  • Bun runtime
  • Botpress ADK installed
  • A Botpress Cloud account
  • A GitHub App configured for your repository
  • A Mintlify account with API access (and access to the repository you're listening to)

Setup

1. Clone and Install Dependencies

git clone <your-repo-url>
cd adk-docs-updater
bun install

2. Configure GitHub Integration

You'll need to create a GitHub App and configure it for webhook events. Follow the GitHub integration guide to set this up (ignore the steps where you configure the integration in Botpress Studio).

Once configured, grab the following credentials:

Variable Description
GITHUB_APP_ID Your GitHub App's ID
GITHUB_APP_PRIVATE_KEY The private key generated for your GitHub App
GITHUB_APP_INSTALLATION_ID The installation ID for your repository
GITHUB_WEBHOOK_SECRET The webhook secret configured in your GitHub App

3. Configure Mintlify Integration

Set up the Mintlify integration by following the Mintlify integration guide (ignore the steps where you configure the integration in Botpress Studio).

You'll need:

Variable Description
MINTLIFY_API_KEY Your Mintlify Admin API key (create one in Settings > API Keys)
MINTLIFY_PROJECT_ID Your Mintlify Project ID (found in your dashboard)

4. Set Environment Variables

Create a .env file in the project root:

GITHUB_APP_ID=your_app_id
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
GITHUB_APP_INSTALLATION_ID=your_installation_id
GITHUB_WEBHOOK_SECRET=your_webhook_secret
MINTLIFY_API_KEY=your_mintlify_api_key
MINTLIFY_PROJECT_ID=your_mintlify_project_id

5. Start Development Server

bun run dev

This starts the ADK development server where you can test and iterate on your agent.

6. Deploy

When you're ready to deploy:

bun run deploy

About

A Botpress ADK agent that updates Mintlify documentation when PRs are merged in your codebase.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published