# gitcommitreader

> Git commit reader

Latest version **1.0.2** (published 2019-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install gitcommitreader
pnpm add gitcommitreader
yarn add gitcommitreader
bun add gitcommitreader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-09-06 |
| First published | 2019-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yaroslav Gaponov |
| Maintainers | yaroslavgaponov |
| Keywords | git |

## Links

- npm: https://www.npmjs.com/package/gitcommitreader
- Repository: https://github.com/YaroslavGaponov/gitcommitreader
- Homepage: https://github.com/YaroslavGaponov/gitcommitreader#readme
- Issues: https://github.com/YaroslavGaponov/gitcommitreader/issues
- npm.io page: https://npm.io/package/gitcommitreader

## Recent versions

- 1.0.2 (latest) — 2019-09-06
- 1.0.1 — 2019-09-06
- 1.0.0 — 2019-09-05

## README

GitCommitReader
===============================
Simple Readable stream for git commits

## Exampes

### All commits
```javascript
GitCommitReader()
    .pipe(new StringifyStream())
    .pipe(process.stdout)
;
```

Output
```json
{ "hash": "5c24897", "subject": "This is commit" }
```

### Only fix
```javascript
GitCommitReader({filter: /fix:.*$/})
    .pipe(new StringifyStream())
    .pipe(process.stdout)
;
```

Output
```json
{ "hash": "5c24897", "subject": "fix: This is commit" }
```


### Only right commits
```javascript
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
```json
{ "hash": "5c24897", "subject": "feat: [TEAM-1234] This is commit", "type": "feat", "jira": "[TEAM-1234]", "message": "This is commit" }
```

---
_Source: https://npm.io/package/gitcommitreader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
