Skip to content

Repository files navigation

Sherpai Logo

Sherpai

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.

Description

Sherpai is a GitHub App built with Probot that helps developers to review their code and provide constructive feedback.

Custom Rules

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

Setup

Local Development

  1. Clone this repository
git clone https://github.com/sajxraj/sherpai.git
cd sherpai
  1. Install dependencies
npm install
  1. 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 & Write
          • Contents: Read
          • Metadata: Read
        • Subscribe to events: Pull request, Pull request review, Pull request review comment
  2. Generate a private key

    • In your GitHub App settings, click "Generate a private key"
    • Save the downloaded .pem file securely
  3. Configure environment variables

    • Create a .env file 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>
    
  4. Run the bot

yarn start

Docker Setup

# 1. Build container
docker build -t sherpai .

# 2. Start container
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> sherpai

Contributing

If 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.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages