gitcommitreader
v1.0.2
Published
Git commit reader
Downloads
1
Readme
GitCommitReader
Simple Readable stream for git commits
Exampes
All commits
GitCommitReader()
.pipe(new StringifyStream())
.pipe(process.stdout)
;
Output
{ "hash": "5c24897", "subject": "This is commit" }
Only fix
GitCommitReader({filter: /fix:.*$/})
.pipe(new StringifyStream())
.pipe(process.stdout)
;
Output
{ "hash": "5c24897", "subject": "fix: This is commit" }
Only right commits
GitCommitReader({
filter: /^(\w*)(?:\((.*)\))?:\s*(\[\w+\-\d+\])?\s*(.*)$/,
pattern: /^(\w*)(?:\((.*)\))?:\s*(\[\w+\-\d+\])?\s*(.*)$/,
fields: ['type', null, 'jira', 'message']
})
.pipe(new StringifyStream())
.pipe(process.stdout)
;
Output
{ "hash": "5c24897", "subject": "feat: [TEAM-1234] This is commit", "type": "feat", "jira": "[TEAM-1234]", "message": "This is commit" }