- Notifications
You must be signed in to change notification settings - Fork11
CMF is a simple-2-use utility to standardize commit messages on projects
License
walmartdigital/commit-message-formatter
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
CMF is a simple-to-use utility to standarized commit messages on projects.
- Installation via npm command is now deprecated and no longer maintained onV3.
- You can still be using your
.cmf.yamlfile. Now you can extend this file with new attributes.
- .cmf.yaml file is no longer required if you want to use a simple flow.
- The default flow of v3 is now strongly forced to useConventional Commits.
- CMF binary is renamed to git-cmf, so now you can use it directly from git as
git cmfcommand. - CMF is now available from Homebrew.
cmf initis cleaner now, it just creates a .cmf.yaml file witha simple flow to let you customize as you want.
- Using go install:
go install github.com/walmartdigital/commit-message-formatter - Using Brew:
brew tap walmartdigital/homebrew-git-cmfbrew install git-cmf
- Download binaries from Github
If you want to customize your flow, you can rungit cmf init,this command will create a .cmf.yaml file with the default flow.
Then you can change the flow as you want.
CMF has inner variables and you can access it throw templates using{{}}:
- {{BRANCH_NAME}} it will print the current branch name of your repository
Additionally, you can include external environment variables using theENVblock described on the template.
It is possible to config CMF as you like, you can changecustom flows, templates, or assign default flows. You can do this usinga local file on the root of your project or set as globalpreferences with a file on your Home directory called.cmf.yaml.
A.cmf.yaml file is composite by 3 main blocks:
- ENV
- PROMPT
- TEMPLATE
It is a list of environment variables names, that later are mappings to beaccessible from other blocks.
ENV: - ENVIRONMENT_1 - ENVIRONMENT_2 ... - ENVIRONMENT_10Describe an input flow.
You can create your custom flows using this configuration attribute. EveryKEY` attribute is mapping as a variable within the flow.
Prompt accepts two kinds of questions:
Single question:
- KEYvariable name
- LABELprompt title
Select question:
- KEYvariable name
- LABELprompt title
- OPTIONSlist of options
- VALUEvariable value
- DESCvariable description
PROMPT: - KEY: "CHANGE" LABEL: "Select the type of change:" OPTIONS: - VALUE: "feature" DESC: "A new feature" - VALUE: "fix" DESC: "A Bug fix" - VALUE: "update" DESC: "An update code change (moving or split code)" - VALUE: "docs" DESC: "Documentation only changes" - VALUE: "style" DESC: "Small changes of code style" - VALUE: "test" DESC: "Add, change or update test code" - KEY: "MODULE" LABEL: "Affected module:" - KEY: "MESSAGE" LABEL: "Commit message:"TEMPLATE: "{{CHANGE}}({{MODULE}}): {{MESSAGE}}"Defines the way the commit message will be formatted using variables described on .cmf.yaml file.
TEMPLATE: "{{CHANGE}}({{MODULE}}): {{MESSAGE}}"Use GitHub issues for requests.
I actively welcome pull requests; learn how tocontribute.
CMF is available under the MIT License.
About
CMF is a simple-2-use utility to standardize commit messages on projects
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.