Gathering detailed insights and metrics for @hamosapience/jira-prepare-commit-msg
Gathering detailed insights and metrics for @hamosapience/jira-prepare-commit-msg
npm install @hamosapience/jira-prepare-commit-msg
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70.8
Supply Chain
98.8
Quality
75.1
Maintenance
100
Vulnerability
100
License
TypeScript (95.08%)
JavaScript (4.92%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
87,958
Last Day
82
Last Week
350
Last Month
1,370
Last Year
15,676
MIT License
119 Stars
827 Commits
37 Forks
3 Watchers
8 Branches
9 Contributors
Updated on Dec 13, 2024
Latest Version
1.9.0
Package Id
@hamosapience/jira-prepare-commit-msg@1.9.0
Unpacked Size
23.17 kB
Size
7.28 kB
File Count
8
NPM Version
6.14.8
Node Version
14.15.1
Cumulative downloads
Total Downloads
Last Day
82.2%
82
Compared to previous day
Last Week
15.5%
350
Compared to previous week
Last Month
14.4%
1,370
Compared to previous month
Last Year
-45%
15,676
Compared to previous year
1
The husky command to add JIRA ticket ID into the commit message if it is missed.
The JIRA ticket ID is taken from a git branch name.
Install the package using NPM
1npm install husky jira-prepare-commit-msg --save-dev
For Husky 5:
Execute command
1husky add .husky/prepare-commit-msg 'npx jira-prepare-commit-msg $1'
For Husky 2-4:
Inside your package.json add a standard husky npm script for the git hook
1{ 2 "husky": { 3 "hooks": { 4 "prepare-commit-msg": "jira-prepare-commit-msg" 5 } 6 } 7}
Starting with v1.3 you can now use different ways of configuring it:
jira-prepare-commit-msg
object in your package.json
.jirapreparecommitmsgrc
file in JSON or YML formatjira-prepare-commit-msg.config.js
file in JS formatSee cosmiconfig for more details on what formats are supported.
package.json
example:1{ 2 "jira-prepare-commit-msg": { 3 "messagePattern": "[$J]\n$M", 4 "jiraTicketPattern": "([A-Z]+-\\d+)", 5 "commentChar": "#", 6 "isConventionalCommit": false, 7 "allowEmptyCommitMessage": false 8 } 9}
jira-prepare-commit-msg
supports special message pattern to configure where JIRA ticket number will be inserted.
$J
will be replaced on JIRA ticket number$M
will be replaced on commit message.Pattern [$J]\n$M
is currently supported by default.
1{ 2 "jira-prepare-commit-msg": { 3 "messagePattern": "[$J]\n$M" 4 } 5}
[$J] $M
[$J]-$M
$J $M
NOTE: the supplied commit message will be cleaned up by strip
mode.
jira-prepare-commit-msg
allows using custom regexp string pattern to search JIRA ticket number.
Pattern ([A-Z]+-\\d+)
is currently supported by default.
NOTE: to search JIRA ticket pattern flag i
is used: new RegExp(pattern, i')
1{ 2 "jira-prepare-commit-msg": { 3 "jiraTicketPattern": "([A-Z]+-\\d+)" 4 } 5}
Git uses #
by default to comment lines in the commit message. If default char was changed jira-prepare-commit-msg
can allow set it.
1{ 2 "jira-prepare-commit-msg": { 3 "commentChar": "#" 4 } 5}
The commit message might be empty after cleanup or using -m ""
, jira-prepare-commit-msg
might insert the JIRA ticket number anyway if this flag is set.
1{ 2 "jira-prepare-commit-msg": { 3 "allowEmptyCommitMessage": true 4 } 5}
jira-prepare-commit-msg
supports conventional commit. To insert JIRA
ticket number to the description set the following setting:
1{ 2 "jira-prepare-commit-msg": { 3 "isConventionalCommit": true 4 } 5}
NOTE: For description will be applied messagePattern
If the configuration is:
1{ 2 "jira-prepare-commit-msg": { 3 "messagePattern": "[$J] $M", 4 "isConventionalCommit": true 5 } 6}
and commit message is fix(test)!: important changes
then at result will be fix(test)!: [JIRA-1234] important changes
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
3 existing vulnerabilities detected
Details
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
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-24
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