« back

Rialto Playbook

Welcome to the Rialto Playbook!

Here you can find more information on planning, development flow etc. within the Rialto team.

Development Flow

Git Protocol

A guide for programming within version control.

Maintain a repo

Write a Feature

Create a local feature branch based off master.

git checkout master
git pull
git checkout -b feature/<branch-name>
eg. git checkout -b feature/new-awesome-feature

Rebase frequently to incorporate upstream changes.

git fetch (origin)
git rebase (origin/)master

Resolve conflicts. When feature is complete and tests pass, stage the changes.

git add .

When you've staged the changes, commit them.

git status
git commit

Write a good commit message. Example format:

Capitalised present-tense summary under 50 characters

* More information about commit (under 72 characters).
* Even more information about commit (under 72 characters).

http://project.management-system.com/ticket/123

If you've created more than one commit, use git rebase interactively to squash them into cohesive commits with good messages:

git rebase -i (origin/)master

Share your branch.

git push (origin) <branch-name>

Submit a GitHub pull request.

Link Pull Request to the corresponding ticket on Trello via Github plugin.

Code Review

A team member other than the author reviews the pull request. They follow Code Review guidelines to avoid miscommunication.

They make comments and ask questions directly on lines of code in the GitHub web interface.

When satisfied, they merge the pull request and remove the feature branch.

Everyone

Having Your Code Reviewed

Reviewing Code

Understand why the change is necessary (fixes a bug, improves the user experience, refactors the existing code). Then:

Style Comments

Reviewers should comment on missed style guidelines. These guidelines are enforced by Rubocop, an static code linter for Ruby. (We have a Codeclimate integration on Github which will automatically style check our code). Example comment:

> Order resourceful routes alphabetically by name.

An example response to style comments:

Whoops. Good catch, thanks.

If you disagree with a guideline, bring the discussion to the team and if necessary we can change Rubocop config.

Adjusting code

When both reviewer and author agree on what commits should be changed in this pull-request, try and adjust the corresponding commit with either git commit --fixup (and don't forget to autosquash afterwards) or go back to the commit with git commit -i(interactive rebase).

Topics