Skip to content

Commit af5e2d9

Browse files
author
Rodrigo Navarro
committed
v2 (docs): Add readme v2 updates
1 parent c1c92a5 commit af5e2d9

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

Readme.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CMF Commit Message Formatter
1+
# CMF Commit Message Formatter - V2
22

33
CMF is a simple to use utility to standarize commit messages on projects.
44

@@ -8,47 +8,43 @@ Install via npm, just do `$ npm install -g go-cmf`
88

99
Or from Go `go install github.com/walmartdigital/commit-message-formatter`
1010

11-
Once installed, go to your project an run `$ cmf` after add your files to your stage area.
11+
Once installed, go to your project an run `$ cmf init` and select one of the flows, it will create a `.cmf.yaml`file on your project with your selected flow.
1212

1313
## Flows
1414

15-
CMF have two flows (for now) default and jira
15+
CMF have three flows (for now) default, Jira and custom
1616

1717
### Default
1818

19-
Running `$ cmf` you get the default flow, you will be prompt for:
19+
Running `$ cmf init` and select default, you will get the default flow and prompted for:
2020

2121
- Type of change you made to your code
2222
- Module affected by this change
2323
- Commit message or description of your change
2424

2525
### Jira
2626

27-
Running `$ cmf jira` you get jira flow, this time you will be prompt for:
27+
Running `$ cmf init` and select Jira, you will get the jira flow, this time you will be prompt for:
2828

2929
- Jira task ID
3030
- Type of change you made to your code
3131
- Commit message or description of your change
3232

33-
> If you want to do jira as a defualt flow just create a `.cmf.yaml`in the root of your project:
33+
### Custom
3434

35-
```
36-
DEFAULT: jira
37-
```
35+
Running `$ cmf init`and select custom, you will get the custom flow, this time it will create a `.cmf.yaml`file with default flow but with annotations of how change it.
3836

3937
---
4038

41-
## Configurations
39+
## Variables
4240

43-
It is possible to config CMF as you like, you can change **custom flows, templates or assign default flows**. You can do this using a local file on the root of your porject or setting as global preferences with a file on your Home directory called `.cmf.yaml`.
41+
CMF have inner variables and you can access it throw templates using `{{}}`:
4442

45-
### DEFAULT
43+
- {{BRANCH_NAME}} it will print the current branch name of your repository
4644

47-
Set a flow as default:
45+
## Configurations
4846

49-
```
50-
DEFAULT: jira
51-
```
47+
It is possible to config CMF as you like, you can change **custom flows, templates or assign default flows**. You can do this using a local file on the root of your porject or setting as global preferences with a file on your Home directory called `.cmf.yaml`.
5248

5349
### TEMPLATE
5450

@@ -70,7 +66,7 @@ TEMPLATE: "{{CHANGE}}({{MODULE}}): {{MESSAGE}}"
7066

7167
Default template `{{JIRA-TASK}} ({{CHANGE}}): {{MESSAGE}}`. You can use this variables:
7268

73-
- JIRA*TASK \_jira task id*
69+
- JIRA*TASK \_jira task id, by default {{BRANCH_NAME}}*
7470
- CHANGE _type of change: feature, fix, update_
7571
- MESSAGE _commit message_
7672

0 commit comments

Comments
 (0)