Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eslint/eslint-github-bot
Plugin-based GitHub bot for ESLint
https://github.com/eslint/eslint-github-bot
bot eslint eslint-github-bot github-bot probot
Last synced: 16 days ago
JSON representation
Plugin-based GitHub bot for ESLint
- Host: GitHub
- URL: https://github.com/eslint/eslint-github-bot
- Owner: eslint
- License: mit
- Created: 2017-06-25T23:47:44.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T14:10:26.000Z (9 months ago)
- Last Synced: 2024-10-29T14:58:23.226Z (4 months ago)
- Topics: bot, eslint, eslint-github-bot, github-bot, probot
- Language: JavaScript
- Homepage:
- Size: 1020 KB
- Stars: 65
- Watchers: 13
- Forks: 20
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/eslint/eslint-github-bot/workflows/CI/badge.svg)](https://github.com/eslint/eslint-github-bot/actions)
# ESLint GitHub bot
`eslint-github-bot` is a bot created with [probot](https://github.com/probot/probot) which automates some common tasks for repositories run by the ESLint team.
## Environment Variables:
* `APP_ID` (required): The numeric GitHub app ID
* `PRIVATE_KEY` (required): the contents of the private key you downloaded after creating the app.
* `WEBHOOK_SECRET` (required): Secret setup for GitHub webhook or you generated when you created the app.
* `PORT`: Port for web server _(optional, defaults to 8000)_.## :wrench: Setup
* Clone this repo
* `npm install`
* `npm test`To start the server locally, you'll need:
* A PEM file
* A `.env` file that specifies the required environment variablesThe `APP_ID` and `WEBHOOK_SECRET` need to be present but need not be the registered application ID or webhook secret to start the server. `PRIVATE_KEY` must be a valid PEM private key.
#### Adding plugins
To add a plugin:
1. Create the plugin as a new file in `src/plugins`.
1. Add the plugin to the list in `src/plugins/index.js`.
1. Add the plugin to the list in `src/app.js` to enable it by default.## Deployment
The bot is deployed to a [Dokku](https://dokku.com) instance named and is installed as a GitHub Application at the organization level.
The URL to receive webhooks is the default for Probot, which is `/api/github/webhooks`. This must be configured for the app on the ESLint organization.
### Health Check