Skip to content

Contributing to the project

Punkael edited this page Jul 28, 2019 · 13 revisions

We welcome contributions to the project!

Our project uses Git Flow. We use a develop branch as the 'main' branch for all feature work. All feature branch off of develop, and through pull requests on github, are merged into develop. When we are ready for a release, we cut a 'release', validate in QA and then finish the release, which merges into master with a release tag.

Settings

First, setup GitFlow on your machine. Installation Guide

Second, clone the repo locally.

Then, checkout origin/develop branch locally:

git checkout --track origin/master

Finally, update your .git/config settings for the project by opening the file openelections/.git/config, and replace the file with following:

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[remote "origin"]
	url = [email protected]:hackoregon/openelections.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "develop"]
	remote = origin
	merge = refs/heads/develop
[branch "master"]
	remote = origin
	merge = refs/heads/master
[gitflow "branch"]
	master = master
	develop = develop
[gitflow "prefix"]
	feature = feature/
	release = release/
	hotfix = hotfix/
	support = support/
	versiontag =

Development Flow

To get started, hop onto our Projects board and identify a story and assign yourself. Next, create a feature branch off of develop and push to GitHub:

git checkout develop
git pull develop
git flow feature start name-your-feature-branch
git commit --allow-empty -m "Starting feature work on GH-26"

Now, open a pull request and label with WIP: Your Feature Name GH-26. This will let everyone know you are ready to start working on the issue and tag the issue with you PR. Write your code, commit small stuff often and rebase off develop often.

When the PR is ready, remove WIP from the title, and we'll get it reviewed and merged in.