Skip to content

Instantly share code, notes, and snippets.

@Bryan-Cee
Created February 16, 2020 14:31
Show Gist options
  • Save Bryan-Cee/f5da2fa0f4c9a58d17373aa614ee0772 to your computer and use it in GitHub Desktop.
Save Bryan-Cee/f5da2fa0f4c9a58d17373aa614ee0772 to your computer and use it in GitHub Desktop.
### Branch Naming
Branches created should be named using the following format:
```
{story type}-{2-3 word summary}
```
`story-type` - Indicates the context of the branch and should be one of:
- feat == Feature
- bug == Bug
- chore == Chore
- ref == Refactor
`story-summary` - Short 2-3 words summary about what the branch contains
**Example**
```
feat-resources-rest-endpoints
```
### PR Naming
The PR title should be named using the following format:
```
#[STORY_ID] Story description
```
**Example**
```
#111504508 Build out REST Endpoints for Resources (CRUD)
```
### PR Description Template (Markdown)
The description of the PR should contain the following headings and corresponding content in Markdown format.
```md
#### 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:
```
**Example**
![](https://github.com/andela/bestpractices/raw/master/img/git-naming.png)
### Commits
Atomic commits should be made with the format:
```
<type>(<scope>): <subject>``<BLANK LINE> <body> <BLANK LINE> <footer>
```
Any line cannot be longer than 100 characters, meaning be concise.
```<type>``` should be:
* feature
* bug
* chore
* release
* refactor
* documentation
* style
* test
```<scope>``` should be something specific to the commit change. For example:
costume
* flight
* fighting-style
* fan-base
* logo and so on.
```<subject>``` text should:
* use present tense: "save" not "saved" or "saving"
* not capitalize first letter i.e no "Carry to safety"
* not end with a dot (.)
**Message body (optional)** If a body is to be written, it should:
* written in present tense.
* include the reason for change and difference in the previous behaviour
**Message Footer** This should be used for referencing the issues using the following keywords: Start, Delivers, Fixes and Finishes. it should be inside a square bracket. Example:
```
[Start #345]
```
or in a case of multiple issues:
```
[Finishes #5438233, #5891837, #4988398]
```
## Example
chore(coveralls):add coveralls yml
[Finishes #153742460]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment