Skip to content

Releases: AnasJahangir/LintBot

LintBot v1.0.0 - Initial Release

03 Nov 22:54
862b12d
Compare
Choose a tag to compare

We are excited to announce the first release of LintBot!

LintBot is a powerful GitHub App designed to automatically check JavaScript files in pull requests for code quality issues using ESLint. This initial release brings you the following features:

Features:

  • Automatic ESLint Checks: Every pull request triggers an ESLint check on JavaScript files.

  • Detailed Feedback: Provides feedback directly in the pull request comments, highlighting any errors or warnings found by ESLint.

Getting Started

Prerequisites

  • Node.js (version 14 or higher)
  • GitHub account and a GitHub App setup
  • MongoDB (if you choose to store any data)

Installation

  1. Clone the repository:
    git clone https://github.com/AnasJahangir/lintbot.git
    cd lintbot
  2. Install dependencies:
    npm install
  3. Create a .env file in the root of the project and add your GitHub App credentials:
    GITHUB_APP_ID=your_app_id
    GITHUB_PRIVATE_KEY=your_private_key
    PORT=3000

Running the Application

Start the server:

npm start

The server will be listening on the port defined in your environment variables (default is 3000).

How to Set Up GitHub App

  1. Go to your GitHub account settings and navigate to "Developer settings."
  2. Click on "GitHub Apps" and then "New GitHub App."
  3. Fill in the required fields:
  4. Set the necessary permissions:
    • Repository Permissions: Read and write access for issues and pull requests.
  5. Generate a private key and add it to your .env file as GITHUB_PRIVATE_KEY.

API Endpoints

Webhook

POST /webhook - This endpoint listens for GitHub webhook events. When a pull request is opened, it triggers the ESLint checks on JavaScript files.

Folder Structure

lintbot/
├── node_modules/
├── .env
├── package.json
├── index.js
└── README.md