Probot is a robust Node.js framework, currently at version 14.3.2, designed for building GitHub Apps to automate and enhance development workflows. It provides a streamlined, event-driven architecture that significantly simplifies interaction with the GitHub API and handling webhook events. Written in TypeScript, Probot ships with comprehensive type definitions, offering full support for TypeScript projects. The project maintains an active development and release cadence, with minor and patch versions frequently released (typically every few weeks) to deliver bug fixes, critical security updates (such as recent `yaml` dependency patches), and new features. Its primary differentiator is abstracting the complexities of GitHub App development, allowing developers to concentrate on core application logic rather than boilerplate API calls, authentication, or webhook infrastructure.
npm install probotVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic Probot app written in TypeScript, responding to new issue and pull request events by adding comments. It also includes error handling and shows how to log messages and use environment variables.
Migrate your app to use ES Modules (`import`/`export`) or stick to Probot v11 for CommonJS compatibility. Ensure your `package.json` specifies `"type": "module"` if using ESM.
Upgrade your Node.js environment to a compatible version (e.g., Node.js 20.18.1 or Node.js 22).
Consult the `@octokit/core` release notes for breaking changes and adapt your Octokit API calls accordingly. Always test your app after major `@octokit` dependency updates.
Review your environment variable loading strategy. If you rely on specific `dotenv` features (e.g., `.env.local` files, variable expansion), you might need to handle them manually or use a compatible alternative alongside Probot's native parsing.
Regularly update your Probot package to the latest patch release (`npm update probot`) to ensure all known security vulnerabilities in its dependencies are addressed.
Update your import statements to use ES Modules syntax: `import { Probot } from 'probot';`. Ensure your project's `package.json` has `"type": "module"` if you are using `.js` files as ESM, or rename your app files to `.mjs`.Ensure `PRIVATE_KEY` is set in your environment variables. It should contain the entire content of the `.pem` file downloaded from your GitHub App settings, including `-----BEGIN RSA PRIVATE KEY-----` and `-----END RSA PRIVATE KEY-----` headers/footers. Also, check that `APP_ID` is correctly set.
Upgrade your Node.js environment to version `^20.18.1` or `>= 22` to match the requirements. Use a tool like `nvm` to manage Node.js versions efficiently.
For local development, use `smee.io` (or similar) and set `WEBHOOK_PROXY_URL` to your Smee URL. For deployment, ensure your server is publicly accessible and the webhook URL in your GitHub App settings points to your deployed Probot app's `/api/github/webhooks` endpoint.