Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

gitcommitreader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitcommitreader

Git commit reader

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

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" }

Keywords

git

FAQs

Package last updated on 06 Sep 2019

Did you know?

Socket

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.

Install

Related posts