Inspired by the Sherpa people of the Himalayas, known for their expertise and guidance in navigating difficult paths. Our bot is designed to bring that same thoughtful support to your code.
Sherpai is a GitHub App built with Probot that helps developers to review their code and provide constructive feedback.
You can create a sherpai.yml file inside the .github directory and provide it custom rules for you codebase. For example;
rules:
- All variable must be camelCase
- Do not throw error without message- Clone this repository
git clone https://github.com/sajxraj/sherpai.git
cd sherpai- Install dependencies
npm install-
Create a GitHub App
- Go to GitHub Apps settings
- Click "New GitHub App"
- Fill in the following details:
- GitHub App name:
sherpai - Homepage URL:
http://localhost:3000 - Webhook URL:
https://<ngrok-site>.app/api/github/webhooks - Webhook secret: Generate a random string
- Permissions:
- Repository permissions:
Pull requests: Read & WriteContents: ReadMetadata: Read
- Subscribe to events:
Pull request,Pull request review,Pull request review comment
- Repository permissions:
- GitHub App name:
-
Generate a private key
- In your GitHub App settings, click "Generate a private key"
- Save the downloaded
.pemfile securely
-
Configure environment variables
- Create a
.envfile in the root directory - Add the following variables:
APP_ID=<your-app-id> PRIVATE_KEY=<private-key-from-pem-file> WEBHOOK_SECRET=<your-webhook-secret> OPENAI_API_KEY=<your-openai-api-key> - Create a
-
Run the bot
yarn start# 1. Build container
docker build -t sherpai .
# 2. Start container
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> sherpaiIf you have suggestions for how sherpai could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
