Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose

This document will take you through the process and guidelines for contributing to the app. A general workflow for contributing to this repo is something like: finding a ticket, making a branch, making changes, committing them, pushing them, then making a pull request. This document will take you through that process step by step.

Table of Contents

Table of Contents
maxLevel7
minLevel1

Git

You will need to have a basic understanding of Git to be able to work on thistickets. For an explanation of all the basic concepts of Git, see this presentation by Nick DePatie

...

Then use git checkout -b [branch name] to create and switch to a new branch. Give the branch a short name that follows the naming syntax: #[issue number]-[short but meaningful description] and replace spaces with dashes. Example: #12-add-login-endpoint or #275-refactor-projects-table. The # is important so that GitHub links it to the issue.

Use git status to check which branch you are on. Ensure you stash, reset, or commit your changes before changing branches, unless you want to bring your changes to the other branch. Use git checkout develop to switch back to the develop branch.

...

Test your code to the best of your ability and avoid writing overly complex code. Run the unit tests using yarn test:frontend or yarn test:backend and try to ensure they all pass. Write tests for anything new that you write. If you're unsure of what you should test, ask someone.

...

Next, do git add path/to/file for each file you want to stage to your commit. You can also do git add -A to add all of them, but make sure there are no unwanted files you’re adding first. Run git status again and you should see that your files are properly staged.

Next, use git commit -m [message] to commit your staged file with the message. Use the following syntax for commit messages: #[issue number]: [description of changes made]. Examples: #12: Expanded the creating commmits section or #79: Increased list padding. The # is important so that GitHub can link it to your ticket.

Status
colourRed
titleNOTE: if your commits are not properly tagged, we will reject your pull request and you’ll have to move your changes to a new branch with correct commit messages

Pushing Commits

Use git push to push your branch and commits to the remote GitHub repo. You may need to run git push --set-upstream origin [branch name] as instructed by the git CLI if the branch does not already exist in the GitHub repo and only exists on your local computer.

...