CodeQuestic

Interested in contributing to CodeQuestic?

First of all, thank you for taking the time to contribute! 🤙

The following is a set of guidelines for contributing to this repository. Before contributing, we encourage you to read our Code of Conduct.

Contributing Guide ✨

Forking the CodeQuestic Repository

Click the Fork button at the top right of any CodeQuestic repository's GitHub Page to create a copy in your account, or go directly to the Fork Page & click on Create Fork button. After successfully forking the repo, you'll be redirected to your copy of the CodeQuestic repository.

Cloning the CodeQuestic Repository

On your forked repo, click the button that says <> Code. Under Local tab, it will open a dropdown menu. Copy the link in the input with the label HTTPS or GitHub CLI depending on your preferred cloning mode.

For cloning via HTTPS, first create a folder on your system and open it in VS Code or any other code editor. Then, open the terminal inside this folder and run the following command to clone or have a local copy of the forked repository in this folder:

Terminal window
git clone https://github.com/<your-username>/<repository-name>.git

Here, replace &lt;your-username&gt; with your GitHub username and &lt;repository-name&gt; with the specific CodeQuestic repository name.

You can also clone the forked repo using the GitHub CLI. To do this, run the following command:

Terminal window
gh repo clone <your-username>/<repository-name>

Setup the Development Environment

Ensure you have the following installed:

DependencyVersion Requirement
Node.jsVersion 18 or higher (recommended to use the latest LTS version)
npmLatest version (ensure you're using the most recent release)

Now, navigate to the root directory of the project and run:

Terminal window
npm install

Once installation is done, run the development server:

Terminal window
npm run dev

Now open your browser and navigate to http://localhost:3000 to view the website.

To create a production build of the website, run:

Terminal window
npm run build

To start the production server, run:

Terminal window
npm start

Making your Changes

IMPORTANT

If there is an existing issue that you'd like to contribute to, request to be assigned to it before proceeding with any changes.

If there isn't an existing issue for the feature or bug you wish to work on, you can create a new issue detailing the feature/bug and request to be assigned to it.

Follow the naming conventions while creating the issue (e.g., [Bug]: &lt;Short Description&gt; <Short Description>, [Feature]: &lt;Short Description&gt; <Short Description> or [Docs]: &lt;Short Description&gt; <Short Description>).

Caution

If there are no activity for 7 days then the issue will be unassigned and will be available for others to work on. So, make sure to be active and let the maintainers know if you need more time to work on the issue (provide the latest updates).

Steps to Create a New Branch

1. Ensure you are on the correct base branch

First, check that you're on the correct base branch (main) before creating a new branch.

Terminal window
git checkout main

2. Pull the latest changes

Always pull the latest changes from the remote branch to ensure your branch is up to date.

Terminal window
git pull origin main

3. Create a new branch

Use the git checkout command to create and switch to a new branch following the naming conventions.

Terminal window
git checkout -b <your-branch-name>

4. Make your changes

Now that you're on your new branch, you can make the necessary code changes. After completing your changes, stage them for commit.

Terminal window
git add .

5. Commit your changes

Write a meaningful commit message that summarizes your changes.

Terminal window
git commit -m "Your commit message"

6. Push your changes to the remote repo

Once you've committed your changes, push your branch to the remote repository.

Terminal window
git push origin <your-branch-name>

Opening a Pull Request

Note

You are to make only one contribution per pull request. It makes it easier to review and merge. If you want to add multiple contributions or if you have solved multiple issues, create separate pull requests for each.

Steps to Open a Pull Request

  1. Go to the repository on GitHub.
  2. Click on the Pull requests tab.
  3. Click on New Pull Request.
  4. Select the branch that contains your changes targeting the CodeQuestic's main branch.
  5. Ensure the title follows the naming convention.

Add a Detailed Description

  • In the description field of the pull request, provide a detailed explanation of the changes.
  • Describe what was changed, why it was changed, and any other relevant details.
  • Use the correct way to link issues in the description of the PR by updating the issue number. Do not just add issue numbers everywhere and anywhere you feel like.

Submit the Pull Request:

Submit the Pull Request:

Don't forget

Ensure your pull request complies with the repository's contribution guidelines before submission.

Congratulations! 🎉

You have successfully contributed to the CodeQuestic repository. Your pull request will be reviewed by the maintainers, and if everything is in order, it will be merged into the main branch. If any reviews or changes are requested by the reviewers then please feel free to resolve them so that maintainers can merge your PR.

Thank you for your contribution! 🙌