Skip to content

Outside Contributions

Daniel Floyd edited this page Sep 18, 2021 · 7 revisions

Git Workflow For Outside Contributions

Thank you for wanting to help, please follow these guidelines. We only accept pull requests for current issues, as you will see in the documentation below you will need the issue# during your pull request. Our slack channel is open to all, Please join our slack channel.

If you don't have git on your machine, install it.

First Steps

Please make note of the current issue# you want to work on, you will need this later.

Leave a comment with a brief summary of what you plan to do to fix the issue.

Fork this repository

Fork this repository by clicking on the fork button on the top of this page. This will create a copy of this repository in your account.

Clone the repository

Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the clone button and then click the copy to clipboard icon.

Open a terminal and run the following git command:

git clone "url you just copied"

where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url.

For example:

git clone https://github.com/this-is-you/code-experiment-website.git

Where this-is-you is your GitHub username. Here you're copying the contents of the code-experiment-website repository on GitHub to your computer.

Create a branch

Change to the repository directory on your computer (if you are not already there):

cd code-experiment-website

Now create a branch using the git checkout command:

Please make sure the branch-name is the issue#number

git checkout -b <add-your-new-branch-name>

For example:

git checkout -b issue#10

Setup

This repo has two different apps. We have a react client and a Nodejs mail service. We are also using Eslint, prettier, and husky for making sure our code is clean. Please follow these steps to get the project up and going and making sure your pull requests can go as smoothly as possible.

Code Formatting, Eslint, and Husky Setup

Please run the following command in the root of the project npm install. This will install all the necessary packages to make sure your code is formatted correctly, you get the correct error messages while coding, and your commits are created correctly. I would highly recommend turnin on format on save in vscode. You can turn on format on save by going to your settings and searching for format on save and marking the checkbox.

You can verify this is working by going to any js file. Remove a ; from the end of a line and save the file, this should automatically add the ; back.

Client Setup

Please run the following command in the client folder npm install. After the packages are installed you can turn the server on with npm start, and then go to http://localhost:3000.

Nodemailer Setup

Please run the following command in the mail-server folder npm install. After the packages are installed you can turn the server on with npm start, and then go to http://localhost:4444.

Make necessary changes and commit those changes

Now open the code into your favorite editor and start making any changes you feel are needed to fix the issue.

Push changes to GitHub

Push your changes using the command git push:

git push origin <add-your-branch-name>

replacing <add-your-branch-name> with the name of the branch you created earlier.

Submit your changes for review

If you go to your repository on GitHub, you'll see a Compare & pull request button. Click on that button.

Change the title and description of this pull request to have a short description of the fix along with one of the keywords from before.

Example Title: Update bug by modifying useEffect in contactForm. fixes #112

Example Description: I noticed that the useEffect was being called over and over again. I updated the useEffect dependency list which will fix #112

Basically, the title should be short and to the point, and in the description you can add all the minor details to help us understand what you did to fix the issue.

Don't forget to have this in the title and description, along with any other comments. Be mindful when you use the # you should get a popup that lists the various issue numbers, if you didn't get the popup you might be typing something wrong. We need the fixes #112 in order to close the issue automatically after the pull request is merged.

This should link your pull request to the issue. learn more

Now submit the pull request.

A team member will review your changes, please keep an eye out for any requested changes during this review. Once all the code is working and they like the changes, they will merge it into the repo. Thank you for the help!

Back To Top