@gitlode/plugin-conventional-commits
v0.4.0
Published
Official gitlode plugin for parsing conventional commits
Downloads
435
Maintainers
Readme
@gitlode/plugin-conventional-commits
Parse commit messages with conventional-commits-parser and write the parsed result under
extensions["conventional-commits"] in every gitlode output record.
The plugin uses the commit message from the source commit for both commit facts and file-change facts, so the same parsed payload is available on both record types.
Installation
npm install -g @gitlode/plugin-conventional-commitsUsage
Configure gitlode with --config:
{
"version": 1,
"extensions": {
"conventional-commits": {
"entrypoint": "@gitlode/plugin-conventional-commits"
}
}
}Run gitlode:
gitlode -r main --config ./gitlode.config.json ./my-repoEach emitted record will include:
{
"extensions": {
"conventional-commits": {
"merge": null,
"revert": null,
"header": "feat(parser): add plugin docs",
"body": "Expand README and CHANGELOG.",
"footer": "Refs: #123",
"notes": [],
"mentions": [],
"references": [
{
"raw": "Refs: #123",
"action": null,
"owner": null,
"repository": null,
"prefix": "#",
"issue": "123"
}
],
"type": "feat",
"scope": "parser",
"subject": "add plugin docs"
}
}
}The exact payload shape follows the upstream conventional-commits-parser result. Common fields
include type, scope, subject, body, footer, notes, mentions, and references.
Configuration
This plugin does not define any plugin-specific configuration.
You can omit config entirely:
{
"version": 1,
"extensions": {
"conventional-commits": {
"entrypoint": "@gitlode/plugin-conventional-commits"
}
}
}Compatibility
This package declares:
"peerDependencies": {
"gitlode": "^0.10.0"
}If the running gitlode version does not satisfy this range, gitlode emits a warning and continues.
