Skip to content

Latest commit

 

History

History
188 lines (121 loc) · 5.67 KB

CONTRIBUTING.md

File metadata and controls

188 lines (121 loc) · 5.67 KB

Contributing Guidelines

Contributions are welcome! Feel free to open an issue or submit a pull request if you have a way to improve this project.

Make sure your request is meaningful and you have tested the app locally before submitting a pull request.

This documentation contains a set of guidelines to help you during the contribution process.

Need some help regarding the basics?

You can refer to the following articles on the basics of Git and GitHub in case you are stuck:

Installing Requirements

Requirements

Linux

sudo apt-get install php
sudo apt-get install php-curl
sudo apt-get install composer
sudo apt-get install inkscape

Windows

Install PHP from XAMPP or php.net

▶ How to install and run PHP using XAMPP (Windows)

📥 Download Composer

Clone the repository

git clone https://github.com/DenverCoder1/github-readme-streak-stats.git
cd github-readme-streak-stats

Authorization

To get the GitHub API to run locally you will need to provide a token.

  1. Visit this link to create a new Personal Access Token
  2. Scroll to the bottom and click "Generate token"
  3. Make a copy of the .env.example named .env in the root directory and add your token after TOKEN=.
TOKEN=<your-token>

Install dependencies

Run the following command to install all the required dependencies to work on this project.

composer install

Running the app locally

composer start

Open http://localhost:8000/?user=DenverCoder1 to run the project locally

Open http://localhost:8000/demo/ to run the demo site

Running the tests

Run the following command to run the PHPUnit test script which will verify that the tested functionality is still working.

composer test

Linting

This project uses Prettier for formatting PHP, Markdown, JavaScript and CSS files.

# Run prettier and show the files that need to be fixed
composer lint

# Run prettier and fix the files
composer lint-fix

Submitting Contributions 👨‍💻

Below you will find the process and workflow used to review and merge your changes.

Step 0 : Find an issue

  • Take a look at the existing issues or create your own issues!

issues tab

Step 1 : Fork the Project

  • Fork this repository. This will create a copy of this repository on your GitHub profile. Keep a reference to the original project in the upstream remote.
git clone https://github.com/<your-username>/github-readme-streak-stats.git
cd github-readme-streak-stats
git remote add upstream https://github.com/DenverCoder1/github-readme-streak-stats.git

fork button

  • If you have already forked the project, update your copy before working.
git remote update
git checkout <branch-name>
git rebase upstream/<branch-name>

Step 2 : Branch

Create a new branch. Use its name to identify the issue you're addressing.

# Creates a new branch with the name feature_name and switches to it
git checkout -b feature_name

Step 3 : Work on the issue assigned

  • Work on the issue(s) assigned to you.
  • Make all the necessary changes to the codebase.
  • After you've made changes or made your contribution to the project, add changes to the branch you've just created using:
# To add all new files to the branch
git add .

# To add only a few files to the branch
git add <some files (with path)>

Step 4 : Commit

  • Commit a descriptive message using:
# This message will get associated with all files you have changed
git commit -m "message"

Step 5 : Work Remotely

  • Now you are ready to your work on the remote repository.
  • When your work is ready and complies with the project conventions, upload your changes to your fork:
# To push your work to your remote repository
git push -u origin Branch_Name
  • Here is how your branch will look.

    forked branch

Step 6 : Pull Request

  • Go to your forked repository in your browser and click on "Compare and pull request". Then add a title and description to your pull request that explains your contribution.

compare and pull request

opening pull request

  • Voila! Your Pull Request has been submitted and it's ready to be merged.🥳

Happy Contributing!