Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

CONVENTIONS

Nyambati Thomas edited this page Nov 14, 2016 · 1 revision

Table of Content


  1. Branch Naming
  2. Commit Message
    1. Message Header
    2. Message Body
    3. Message Footer
    4. [Message Example] (#message-example)
  3. Pull Request
    1. PR Title
    2. PR Description Template
    3. PR Example

Branch Naming


Branches created should be named using the following format:

{story type}-{story summary}-{issue id}

story type - Indicates the context of the branch and should be one of:

  • ft == Feature
  • bg == Bug
  • ch == Chore

story summary - Short 2-3 words summary about what the branch contains

issue number - The number of the issue you are working on if it exists

Example

ft-customize-error-response-3

Commit Message


A commit message consists of a header, a body and a footer, separated by a blank line.

Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier to read on github as well as in various git tools.

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

These rules are adopted from the AngularJS commit convention.

Message Header


The message header is a single line that contains succinct description of the change containing a type, an optional scope and a subject.

#####<type> This describes the kind of change that this commit is providing.

  • feat (feature)
  • fix (bug fix)
  • docs (documentation)
  • style (formatting, missing semi colons, …)
  • refactor
  • test (when adding missing tests)
  • chore (maintain)

#####<scope> Scope can be anything specifying place of the commit change. For example events, kafka, userModel, authorization, authentication, loginPage, etc...

#####<subject> This is a very short description of the change.

  • use imperative, present tense: “change” not “changed” nor “changes”
  • don't capitalize first letter
  • no dot (.) at the end

Message Body


  • just as in subject use imperative, present tense: “change” not “changed” nor “changes”
  • includes motivation for the change and contrasts with previous behavior

http://365git.tumblr.com/post/3308646748/writing-git-commit-messages http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

Message Footer


Finished, fixed or delivered stories should be listed on a separate line in the footer prefixed with "Finishes", "Fixes" , or "Delivers" keyword like this:

[(Finishes|Fixes|Delivers) #TRACKER_STORY_ID]

Message Example


feat(kafka): implement exactly once delivery
- ensure every event published to kafka is delivered exactly once
- implement error handling for failed delivery
[Delivers #130635935]

Pull Request


PR Title


The PR title should be named using the following format:

#[ISSUE ID] [Story description]

PR Description Template


The description of the PR should contain the following headings and corresponding content in Markdown format.

#### What does this PR do?
#### Description of Task to be completed?
#### How should this be manually tested?
#### Any background context you want to provide?
#### What are the relevant pivotal tracker stories?
#### Screenshots (if appropriate)
#### Questions:

PR Example