File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,43 @@ Conventional Commit......................................................Passed
7979- duration: 0.05s
8080` ` `
8181
82+ # # Install with pip
83+
84+ `conventional-pre-commit` can also be installed as used from the command line or in your Python project :
85+
86+ ` ` ` shell
87+ pip install conventional-pre-commit
88+ ` ` `
89+
90+ Then run the command line script :
91+
92+ ` ` ` shell
93+ conventional-pre-commit [types] input
94+ ` ` `
95+
96+ Where `[types]` is an optional list of Conventional Commit types to allow (e.g. `feat fix chore`)
97+
98+ And `input` is a file containing the commit message to check :
99+
100+ ` ` ` shell
101+ conventional-pre-commit feat fix chore ci test .git/COMMIT_MSG
102+ ` ` `
103+
104+ Or from a Python program :
105+
106+ ` ` ` python
107+ from conventional_pre_commit.format import is_conventional
108+
109+ # prints True
110+ print(is_conventional("feat: this is a conventional commit"))
111+
112+ # prints False
113+ print(is_conventional("nope: this is not a conventional commit"))
114+
115+ # prints True
116+ print(is_conventional("custom: this is a conventional commit", types=["custom"]))
117+ ` ` `
118+
82119# # Versioning
83120
84121Versioning generally follows [Semantic Versioning](https://semver.org/).
You can’t perform that action at this time.
0 commit comments