
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
commit-ticket
Advanced tools
Git hook intended for automatically placing ticket id from branch name to commit message
It is a very common case to use an agreement for git branch naming. I'm pretty sure everyone has used it.
As well, it is quite common case to have a ticket id in the git branch name. For example, it could be something like:
feature/PROJECT-123. One more common case is the necessity to have a ticket id in the commit message. This job is often done by hands, but it could be automated.
This package adds ticket id to the start of a commit message. Let's imagine you develop in branch feature/PROJECT-123.
At some moment, you want to make a commit with the message made cool things. But you need to have results commit
messages like PROJECT-123 made cool things. It is what this package exactly does.
$ yarn add commit-ticket -D
Create commit-ticket-config.json file in the root of your project
Config should contain only one parameter branchPattern which is a regexp.
{
"branchPattern": "^feature/(\\w+-[0-9]{1,6})"
}
Regexp MUST satisfy two conditions:
feature/PROJECT-123-cool-things
where feature/PROJECT-123 is required part. Only feature/PROJECT-123 should be matched by regexp.You can test your regexp:
"feature/PROJECT-123-cool-things".match(new RegExp(branchPattern)) // should return
// ["feature/PROJECT-123", "PROJECT-123", index: 0, input: "feature/PROJECT-123-cool-things", groups: undefined]
{
"branchPattern": "^feature/(\\w+-[0-9]{1,6})"
}
Adjust hook, for instance with Husky:
hooks:
prepare-commit-msg: commit-ticket $HUSKY_GIT_PARAMS
FAQs
Git hook intended for automatically placing ticket id from branch name to commit message
The npm package commit-ticket receives a total of 0 weekly downloads. As such, commit-ticket popularity was classified as not popular.
We found that commit-ticket demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.