Skip to content

Latest commit

 

History

History
178 lines (124 loc) · 5.41 KB

CONTRIBUTING.md

File metadata and controls

178 lines (124 loc) · 5.41 KB

Contributing to RepoGPT

Thank you for considering contributing to RepoGPT! We welcome contributions of all kinds, including bug fixes, feature enhancements, documentation improvements, and more. This guide will help you get started with contributing to the project.

Table of Contents


Code of Conduct

By participating in this project, you agree to abide by our Code of Conduct. Please read it to understand the expected behavior in our community.

How Can I Contribute?

Reporting Bugs

If you find a bug in the project, please help us by reporting it:

  1. Search Existing Issues: Before creating a new issue, check if the bug has already been reported.
  2. Create a New Issue: If it hasn't been reported, create a new issue and include:
    • A clear and descriptive title.
    • Steps to reproduce the problem.
    • Expected vs. actual behavior.
    • Screenshots or logs, if applicable.
    • Environment details (OS, Node.js version, etc.).

Suggesting Features

We welcome new ideas to improve RepoGPT:

  1. Check for Existing Feature Requests: See if your idea has already been suggested.
  2. Open a New Issue: Provide:
    • A detailed description of the feature.
    • Why it would be useful.
    • Any potential drawbacks.

Improving Documentation

Good documentation helps everyone. You can contribute by:

  • Fixing typos or grammatical errors.
  • Clarifying instructions.
  • Adding examples or tutorials.

Submitting Pull Requests

We appreciate your efforts to contribute code:

  1. Fork the Repository: Click the "Fork" button on GitHub to create your own copy.
  2. Create a Branch: Use a descriptive name (e.g., fix-login-issue or add-chat-feature).
  3. Make Changes: Implement your feature or fix.
  4. Commit Changes: Write clear and concise commit messages.
  5. Push to Your Fork: git push origin your-branch-name.
  6. Create a Pull Request:
    • Go to the original repository.
    • Click on "New Pull Request".
    • Select your branch and provide a detailed description.

Development Setup

Prerequisites

Ensure you have the following installed:

Forking the Repository

  1. Navigate to the RepoGPT GitHub page.
  2. Click the Fork button to create a copy in your GitHub account.

Setting Up Your Environment

  1. Clone Your Forked Repository:

    git clone https://github.com/your-username/repogpt.git
    cd repogpt
  2. Add Upstream Remote:

    git remote add upstream https://github.com/mbarinov/repogpt.git
  3. Install Dependencies:

    pnpm install
  4. Set Up PostgreSQL with pgvector:

    docker run -d \
      --name pgvector \
      -e POSTGRES_USER=postgres \
      -e POSTGRES_PASSWORD=yourpassword \
      -e POSTGRES_DB=repogpt \
      -p 5432:5432 \
      ankane/pgvector
  5. Create a .env File:

    In the project root directory, create a .env file and add:

    DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/repogpt
  6. Initialize the Database Schema:

    npx prisma db push

Running the Application

Start the development server:

pnpm dev

Access the app at http://localhost:3000.

Coding Guidelines

Code Style

  • Consistency: Match the existing code style.
  • Formatting: Use Prettier and ESLint configurations provided in the project.
  • Comments: Comment complex logic and ensure public methods are documented.
  • Variables and Functions: Use clear and descriptive names.

Commit Messages

  • Format: Use the Conventional Commits standard (e.g., feat: add new chat feature).
  • Language: Write in the imperative mood.
  • Reference Issues: If applicable, reference related issues (e.g., fix: resolve login bug closes #123).

Community and Support

License

By contributing, you agree that your contributions will be licensed under the MIT License.


Thank you for your interest in contributing to RepoGPT! Together, we can make this project even better.