You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+13-17Lines changed: 13 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# CMF Commit Message Formatter
1
+
# CMF Commit Message Formatter - V2
2
2
3
3
CMF is a simple to use utility to standarize commit messages on projects.
4
4
@@ -8,47 +8,43 @@ Install via npm, just do `$ npm install -g go-cmf`
8
8
9
9
Or from Go `go install github.com/walmartdigital/commit-message-formatter`
10
10
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.
12
12
13
13
## Flows
14
14
15
-
CMF have two flows (for now) defaultand jira
15
+
CMF have three flows (for now) default, Jira and custom
16
16
17
17
### Default
18
18
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:
20
20
21
21
- Type of change you made to your code
22
22
- Module affected by this change
23
23
- Commit message or description of your change
24
24
25
25
### Jira
26
26
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:
28
28
29
29
- Jira task ID
30
30
- Type of change you made to your code
31
31
- Commit message or description of your change
32
32
33
-
> If you want to do jira as a defualt flow just create a `.cmf.yaml`in the root of your project:
33
+
### Custom
34
34
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.
38
36
39
37
---
40
38
41
-
## Configurations
39
+
## Variables
42
40
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 `{{}}`:
44
42
45
-
### DEFAULT
43
+
- {{BRANCH_NAME}} it will print the current branch name of your repository
46
44
47
-
Set a flow as default:
45
+
## Configurations
48
46
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`.
0 commit comments