Installations
npm install cz-customizable-ghooks
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=10.x
Node Version
10.22.0
NPM Version
6.14.8
Score
88.9
Supply Chain
99.5
Quality
75.3
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
uglow
Download Statistics
Total Downloads
1,070,918
Last Day
1,077
Last Week
9,859
Last Month
54,922
Last Year
265,904
GitHub Statistics
20 Stars
51 Commits
13 Forks
2 Watching
20 Branches
6 Contributors
Package Meta Information
Latest Version
2.0.0
Package Id
cz-customizable-ghooks@2.0.0
Size
12.03 kB
NPM Version
6.14.8
Node Version
10.22.0
Publised On
28 Aug 2020
Total Downloads
Cumulative downloads
Total Downloads
1,070,918
Last day
-59.2%
1,077
Compared to previous day
Last week
-27.9%
9,859
Compared to previous week
Last month
52.8%
54,922
Compared to previous month
Last year
31.8%
265,904
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
cz-customizable-ghooks
Integrate cz-customizable config with ghooks or husky to use a single configuration for commit message generation AND commit message validation.
Purpose
This package validates that a git commit message matches the rules defined in your cz-customizable
config file (see cz-customizable).
Example commit message rules.
Prerequisites
- git
- Node >= 4.x
- commitizen
- cz-customizable
- ghooks or husky
Make sure you have a git repository (git init
) BEFORE installing ghooks, otherwise you have to take extra steps if you install ghooks before running git init
.
Installation
This package is designed to be used in conjunction with commitizen
, cz-customizable
and either ghooks
or husky
.
- Install pre-requisites (if not already installed):
npm i commitizen -g
npm i cz-customizable cz-customizable-ghooks
- Configure cz-customizable in
package.json
:
"config": {
"cz-customizable": {
"config": "path/to/your/cz-customizable-rules.js"
}
}
- Install ONE of these git hook packages:
ghooks
- Install ghooks:
npm i ghooks
- Configure
package.json
:
"config": {
"ghooks": {
"commit-msg": "cz-customizable-ghooks $2"
}
}
An example of this setup is in examples/ghooks
.
husky
- Install husky:
npm i husky
- Configure
package.json
:
"husky": {
"hooks": {
"commitmsg": "cz-customizable-ghooks"
}
}
An example of this setup is in examples/husky
.
Usage
Commit your changes to git as normal. If the commit message entered is invalid, the commit will be rejected with an error message (according to the rules specified in your cz-customizable config). Works with git command-line and visual Git tools (such as SourceTree).
Additional config
appendIssueFromBranchName
If this config value is set to true, the git branch name is queried, and an attempt is made to
parse the branch name, looking for the ticketNumberPrefix
and ticketNumberRegExp
values. If found,
they are appended to the commit message. If the branch name does not match the ticketNumberPrefix
and ticketNumberRegExp
expression, or if ticketNumberPrefix
and ticketNumberRegExp
are not provided,
the full branch name is appended to the commit message.
This property was previously called appendBranchNameToCommitMessage
.
Debugging
You can turn on debug logging by specifying LOGGING_LEVEL=debug
before the cz-customizable-ghooks
command.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 3/12 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
Project has not signed or included provenance with any releases.
Details
- Warn: release artifact v2.0.0 not signed: https://api.github.com/repos/uglow/cz-customizable-ghooks/releases/30297471
- Warn: release artifact v1.6.0 not signed: https://api.github.com/repos/uglow/cz-customizable-ghooks/releases/30297130
- Warn: release artifact v2.0.0 does not have provenance: https://api.github.com/repos/uglow/cz-customizable-ghooks/releases/30297471
- Warn: release artifact v1.6.0 does not have provenance: https://api.github.com/repos/uglow/cz-customizable-ghooks/releases/30297130
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 24 are checked with a SAST tool
Reason
50 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96
- Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj
- Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-px4h-xg32-q955
- Warn: Project is vulnerable to: GHSA-pw54-mh39-w3hc / GHSA-xgh6-85xh-479p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-x2pg-mjhr-2m5x
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
1.8
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More