Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CONTRIBUTING.md #80

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 186 additions & 64 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,147 @@
# Gityzer Contributing Guidelines
# Gityzer Contributing Guidelines 🎯

Thank you for taking the time to contribute to Gityzer. Your help is essential for keeping it great.

Please take a moment to read the following guidelines before contributing:

> **⚠️IMPORTANT**
> **IMPORTANT ⚠️**
>
> **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.**
>
> **An automated process has been implemented to ensure the timely management of Pull Requests (PRs) on this platform.**
>
> **PRs that have been open for a duration exceeding 45 days will be automatically closed, so please plan accordingly.**

## Prerequisites ⚠️
<br>

# Code of Conduct 📃

Please read and follow our [Code of Conduct](https://github.com/vansh-codes/Gityzer/blob/master/CODE_OF_CONDUCT.md)

<br>

# <h1 align="center">Star our Repository ⭐</h1>

### <div align = "center" style = "display:flex; justify-content:space-evenly; gap:100px;" > [![Stars](https://img.shields.io/github/stars/vansh-codes/Gityzer?style=for-the-badge&logo=github)](https://github.com/vansh-codes/Gityzer/stargazers) [![Forks](https://img.shields.io/github/forks/vansh-codes/Gityzer?style=for-the-badge&logo=github)](https://github.com/vansh-codes/Gityzer/network/members) [![Issues](https://img.shields.io/github/issues/vansh-codes/Gityzer?style=for-the-badge&logo=github)](https://github.com/vansh-codes/Gityzer/issues) [![PRs Open](https://img.shields.io/github/issues-pr/vansh-codes/Gityzer?style=for-the-badge&logo=github)](https://github.com/vansh-codes/Gityzer/pulls) [![PRs Closed](https://img.shields.io/github/issues-pr-closed/vansh-codes/Gityzer?style=for-the-badge&logo=github&color=2cbe4e)](https://github.com/vansh-codes/Gityzer/pulls?q=is%3Apr+is%3Aclosed)</div>

<br>

# Prerequisites 📋

- Open Source Etiquette: If you've never contributed to an open source project before, have a read of [Basic etiquette](https://developer.mozilla.org/en-US/docs/MDN/Community/Open_source_etiquette) for open source projects.

- Basic familiarity with Git and GitHub: If you are also new to these tools, visit [GitHub for complete beginners](https://developer.mozilla.org/en-US/docs/MDN/Contribute/GitHub_beginners) for a comprehensive introduction to them.

---
<br>

# Need Help With The Basics? 🤔

If you're new to Git and GitHub, no worries! Here are some useful resources:

- [Forking a Repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
- [Cloning a Repository](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request)
- [How to Create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github)
- [Getting Started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6)
- [Learn GitHub from Scratch](https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources)

## How to Contribute 🤔
<br>

To get started, look at the existing [**Create a new issue**](https://github.com/vansh-codes/gityzer/issues)!
# How to Contribute 🌐

### Setup guidelines 🪜
To get started, look at the existing [**Create a new issue**](https://github.com/vansh-codes/Gityzer/issues/new/choose)!

<br>

## Setup guidelines 🪜

> [!NOTE]
> This is [Next.js](https://nextjs.org/docs) project.
> You must have installed Node.js on your local macahine. If you don't have it installed yet,
you can download it from [here](https://nodejs.org/en/download/package-manager).

<br>

**Follow these steps to setup Gityzer on your local machine 👇**
## First Pull Request ✨

1. **[Fork](https://github.com/vansh-codes/gityzer/fork) the repository**

- [Fork](https://github.com/vansh-codes/gityzer/fork) the repository.
- Clone the forked repository in your local system.

```bash
git clone https://github.com/<your-github-username>/gityzer.git
```
2. **Clone the forked repository**

- Navigate to the [gityzer](https://github.com/vansh-codes/gityzer) folder if you want to contribute to our website.
```bash
git clone https://github.com/<your-github-username>/Gityzer.git
```

```bash
cd gityzer
```
3. **Navigate to the project directory**

```bash
cd Gityzer
```

4. **Create a new branch**

```bash
git checkout -b <your_branch_name>
```

5. **To make changes**

```bash
git add .
```

6. **Now to commit**

```bash
git commit -m "add comment according to your changes or addition of features inside this"
```

7. **Push your local commits to the remote repository**

```bash
git push -u origin <your_branch_name>
```

8. **Create a Pull Request**

9. **Congratulations! 🎉 you've made your contribution**

- Create your GitHub Personal Access Token:
1. Go to [GitHub Personal Access Tokens](https://github.com/settings/tokens/new) or follow this path:
- Settings -> Developer settings -> Personal access tokens -> Tokens (classic) -> Generate new token -> Generate new token (classic).
2. Set the following permissions:
- **repo**
- **user**
3. Generate the token.
4. Copy the token.
5. Paste the token in `.env.local`.

- Now install dependencies:
## Alternatively, 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 project repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the project 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.
- If you need to switch branches, you can do so by clicking on the "Current Branch" dropdown menu and selecting 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 project repository.
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.

8. **Review and Submit:**
- On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
- Once you're satisfied, 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 project repository.

## To Install dependencies 👾

- Installation:

```bash
npm install
Expand All @@ -71,44 +155,23 @@ To get started, look at the existing [**Create a new issue**](https://github.com

- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

> [!NOTE]
> - The new steps for creating a GitHub Personal Access Token provide clear guidance on how to generate and use the token.
> - Make sure to keep the `.env.local` file secure and not share your token publicly.

- Create a new branch for your feature.
```bash
git checkout -b <your_branch_name>
```
- Perform your desired changes to the code base.
- Track and stage your changes.
```bash
# Track the changes
git status

# Add changes to Index
git add .
```
- Commit your changes.
```bash
git commit -m "your_commit_message"
```
- Push your committed changes to the remote repo.
```bash
git push origin <your_branch_name>
```
- Go to your forked repository on GitHub and click on `Compare & pull request`.
- Add an appropriate title and description to your pull request explaining your changes and efforts done.
- Click on `Create pull request`.
- Congrats! 🥳 You've made your first pull request to this project repo.
- Wait for your pull request to be reviewed and if required suggestions would be provided to improve it.
- Celebrate 🥳 your success after your pull request is merged successfully.
<br>

> [!NOTE]
> All images must be in webp or avif format, not png, jpeg, jpg, or others. This practice applies to the entire repository.
>
> Use [freeconvert.com](https://www.freeconvert.com/png-to-webp) to convert images to the required webp or avif formats.

## ✅ Guidelines for Good Commit Messages
<br>

# For Help And Support 💬

- Admin Github Profile:- (Vansh Chaurasiya)[https://github.com/vansh-codes]
- Contact :- [Email]([email protected])

<br>

# Guidelines for Good Commit Messages ✅
We follow a standardized commit message format using Commitlint to ensure consistency and clarity in our commit history. Each commit message should adhere to the following guidelines:

1. **Be Concise and Descriptive**: Summarize the change in a way that’s easy to understand at a glance.
Expand All @@ -117,7 +180,7 @@ We follow a standardized commit message format using Commitlint to ensure consis
4. **Reference Issues and Pull Requests**: Include `issue numbers` or PR references if the commit addresses them.
5. **Issue reference** (Optional): Include the issue number associated with the commit (e.g., `#123`).

#Examples of Invalid Commit Messages
## Examples of Invalid Commit Messages

- `Added new stuff`
- `Fixed a bug`
Expand All @@ -131,9 +194,68 @@ We follow a standardized commit message format using Commitlint to ensure consis
git commit -m "feat(auth): Implement user signup process (#789)"
```

---
<br>

# Good Coding Practices 🧑‍💻

1. **Follow the Project's Code Style**

- Maintain consistency with the existing code style (indentation, spacing, comments).
- Use meaningful and descriptive names for variables, functions, and classes.
- Keep functions short and focused on a single task.
- Avoid hardcoding values; instead, use constants or configuration files when possible.

2. **Write Clear and Concise Comments**

- Use comments to explain why you did something, not just what you did.
- Avoid unnecessary comments that state the obvious.
- Document complex logic and functions with brief explanations to help others understand your thought -process.

3. **Keep Code DRY (Don't Repeat Yourself)**

- Avoid duplicating code. Reuse functions, methods, and components whenever possible.
- If you find yourself copying and pasting code, consider creating a new function or component.

4. **Write Tests**

- Write unit tests for your functions and components.
- Ensure your tests cover both expected outcomes and edge cases.
- Run tests locally before making a pull request to make sure your changes don’t introduce new bugs.

5. **Code Reviews and Feedback**

- Be open to receiving constructive feedback from other contributors.
- Conduct code reviews for others and provide meaningful suggestions to improve the code.
- Always refactor your code based on feedback to meet the project's standards.

<br>

# Pull Request Process 🚀

When submitting a pull request, please adhere to the following:

1. **Self-review your code** before submission. 😀
2. Include a detailed description of the functionality you’ve added or modified.
3. Comment your code, especially in complex sections, to aid understanding.
4. Add relevant screenshots to assist in the review process.
5. Submit your PR using the provided template and hang tight; we'll review it as soon as possible! 🚀

<br>

# Issue Report Process 📌

To report an issue, follow these steps:

1. Navigate to the project's issues section :- [Issues](https://github.com/vansh-codes/Gityzer/issues/new/choose)
2. Please kindly choose the appropriate template according to your issue.
3. Provide a clear and concise description of the issue.
4. Wait until someone looks into your report.
5. Begin working on the issue only after you have been assigned to it. 🚀

- If something is missing here, or you feel something is not well described, please [raise an issue](https://github.com/vansh-codes/gityzer/issues).
<br>

# Thank you for contributing 💗

We truly appreciate your time and effort to help improve our project. Feel free to reach out if you have any questions or need guidance. Happy coding! 🚀

##
Loading