Skip to content

Contributing

Evan Typanski edited this page Aug 4, 2018 · 9 revisions

For those contributing to the website for whatever reason.

For the most part, the following rules apply:

  1. New features require new branches
  2. Never push directly to production
  3. Test all features in master

The master branch is the production branch for the project. Any PRs into it require review and only the webmaster can push directly to master.

Contribution Steps

1) Create a branch for your feature

Each new feature that you make should be on its own descriptive branch. Whether or not changes have already been made, get this branch with the following:

git checkout master
git pull
git checkout -b my-branch-name

Then, make changes on this page with as many commits. To push the branch, use git push --set-upstream origin my-branch-name. This command is shown if you just run git push as well.

Be sure to go into the projects tab, assign the ticket to yourself, and move it to in progress

2) Submit a pull request when finished developing

When development is done (or you want help/review), switch to your branch and submit a pull request in Github using the new pull request button next to the branch dropdown. This pull request should have master as the base and your branch as the compare. Note that you need review from the webmaster before merging.

The pull request should be named as follows:

[Closes #<ISSUE_NUMBER>] PR Title

For example: [Closes #30] Update README

You can see this example PR here: PR number 31

The terminology is important; using the closes keyword will actually close the issue for you, so you don't need to move it to done!

You can make another branch your base branch, not master, but that is not ideal. This makes that branch your dependency, so if that branch gets changes that you did not account for, it can make nastier code conflicts.

3) Merge with master

If all goes well, your pull request will be accepted by the webmaster. Once this happens, first rebase your branch with master to make sure it works fine by using the following commands:

git checkout master
git pull
git checkout my-feature-branch
git rebase -i master
# Settle merge conflicts
git push -f  # This force pushes, since commits were (probably) changed

Make absolutely certain that the website still works after this locally!!

Once this is done, merge the pull request with master and delete the branch. The changes should be deployed to the site automatically within 5 minutes, if not, contact the webmaster.