Skip to content

Latest commit

 

History

History
177 lines (125 loc) · 6.08 KB

CONTRIBUTING.md

File metadata and controls

177 lines (125 loc) · 6.08 KB

RefactorMate Contributing Guidelines

Thank you for taking the time to contribute to our project. Please take a moment to read the following guidelines before contributing:

⚠️IMPORTANT Note

Pull Requests having no issue associated with them will not be accepted. Firstly get an issue assigned, whether it's already opened or raised by you, and then create a Pull Request.

Prerequisites ⚠️

  • Open Source Etiquette: If you've never contributed to an open source project before, have a read of Basic etiquette for open source projects.

  • Basic familiarity with Git and GitHub: If you are also new to these tools, visit GitHub for complete beginners for a comprehensive introduction to them.

  • Make sure you have Node.js installed.

  • Make sure you have PNPM installed.


How to Contribute 🤔

To get started, look at the existing Issues or create a new issue!

Setup guidelines 🪜

Follow these steps to setup RefactorMate on your local machine

  1. Fork the project

    1

  2. Clone the project to run on your local machine using the following command:

    git clone https://github.com/<your_github_username>/RefactorMate.git
  3. Get into the root directory

    cd .\RefactorMate\
  4. Install all dependencies by running

    pnpm install
  5. Get OpenAI API Key here

    Configure API key in .env file

    VITE_OPENAI_API_KEY = <YOUR_OPENAI_API_KEY>
  6. Create your branch

    git checkout -b <your_branch_name>
  7. Run the Client (Frontend) Start the frontend application:

    pnpm run frontend

    The client will be accessible at http://localhost:5173 by default.

  8. Run the Server (Backend) Start the backend:

    pnpm run backend

    The server will be running at PORT:8000

  9. Make your changes before staging them.

  10. Stage your changes

    git add <filename>

    or

    git add .
  11. Commit your changes

    git commit -m "<your-commit-message>"
  12. Push your changes to your branch

    git push origin "<your_branch_name>"
  13. Create a PULL REQUEST 💣

    Click compare across forks if you don't see your branch

Important

Ensure your PR title conforms to the required format. Use one of the specified prefixes, followed by a colon and a space. Here are the valid prefixes:

  • build:
  • chore:
  • docs:
  • feat:
  • fix:
  • perf:
  • refactor:
  • revert:
  • style:
  • test:

Example:

feat: add new login feature

Provide a clear description of the changes you made and submit your PR.

Alternatively, you can also contribute using GitHub Desktop 💻

  1. Open GitHub Desktop 🖥️ 🚀 Launch GitHub Desktop and log in to your GitHub account if you haven't already.

  2. Clone the Repository 🔄

    • If you haven't cloned the RefactorMate repository yet, follow these steps:
      • Click on the Filemenu in GitHub Desktop.
      • Select Clone Repository.
      • Choose the RefactorMate repository from the list of repositories on GitHub and clone it to your local machine.
  3. Switch to the Correct Branch 🌿

    • Ensure you are on the branch that you want to submit a pull request for.
    • To switch branches:
      • Click on the Current Branch dropdown menu in GitHub Desktop.
      • Select the desired branch.
  4. Make Changes ✏️

    • Make your changes to the code or files in the repository using your preferred code editor.
  5. Commit Changes 📝

    • In GitHub Desktop:
      • You'll see a list of the files you've changed. Check the box next to each file you want to include in the commit.
      • Enter a summary and description for your changes in the Summary and Description fields, respectively.
      • Click the Commit to <branch-name> button to commit your changes to the local branch.
  6. Push Changes to GitHub ⬆️

    • After committing your changes, click the Push origin button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.
  7. Create a Pull Request 📩

    • Go to the GitHub website and navigate to your fork of the RefactorMate repository.
    • Click on the Compare & pull request button between your fork and the original repository.
  8. Review and Submit ✅

    • On the pull request page:
      • Review your changes.
      • Add any additional information, such as a title and description, that you want to include with your pull request.
      • Click the Create pull request button to submit your pull request.
  9. Wait for Review ⏳

  • Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the RefactorMate repository.

Useful Links 🔗