Skip to content

Instantly share code, notes, and snippets.

@Oliver-ke
Last active July 14, 2022 19:31
Show Gist options
  • Save Oliver-ke/5b350436c804edd00a478aa776198e02 to your computer and use it in GitHub Desktop.
Save Oliver-ke/5b350436c804edd00a478aa776198e02 to your computer and use it in GitHub Desktop.
This gist containes common conventions such as PR naming, Commit messages, PR description that should be followed for a teams project

Branch Naming

Branches being created should have the following format:

<story type>/<story id>/<3-4 word story description>

#Example

chore/111504508/save-the-world

The story type indicates the context of the branch and should be written in full and with lowercase letters:

  • feature
  • chore
  • bug
  • release

The story description is a summary about the purpose of the branch.It is delimited with hyphen (-). For example, travis-ci-setup

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]
  • Bugs: [Fixes]
  • Chores: [Finishes]
  • Features: [Delivers]

Message Example


feat(models): setup database models
- add model file for the rating table
- add model file for the average rating table
[Delivers #166172464]

PR Naming

#<story-id> story description

Example

#869522144 Build HQ for meetings

PR Description Template (Markdown)

The description should contain the following headings and the related content:

#### 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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment