Socket
Socket
Sign inDemoInstall

git-raw-commits

Package Overview
Dependencies
3
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    git-raw-commits

Get raw git commits out of your repository using git-log(1)


Version published
Weekly downloads
3.8M
decreased by-19.01%
Maintainers
3
Install size
516 kB
Created
Weekly downloads
 

Package description

What is git-raw-commits?

The git-raw-commits npm package is designed to generate raw git commits from your repository's history. It allows developers to programmatically access commit information, which can be useful for generating changelogs, analyzing project history, or automating versioning processes.

What are git-raw-commits's main functionalities?

Generating raw commits

This feature allows you to generate raw commit data between two tags (from 'v1.0.0' to 'v2.0.0' in this example). The output can be piped to any writable stream, such as `process.stdout` for display or a file stream for saving.

const gitRawCommits = require('git-raw-commits');
gitRawCommits({ from: 'v1.0.0', to: 'v2.0.0' }).pipe(process.stdout);

Filtering commits

This feature demonstrates how to filter commits by a specific pattern using the `grep` option. In this example, only commits with 'Fix' in their messages between 'v1.0.0' and the latest commit ('HEAD') are generated.

const gitRawCommits = require('git-raw-commits');
gitRawCommits({ from: 'v1.0.0', to: 'HEAD', grep: 'Fix' }).pipe(process.stdout);

Other packages similar to git-raw-commits

Readme

Source

NPM version Build Status: Linux Build Status: Windows Dependency Status Coverage Status

Get raw git commits out of your repository using git-log(1)

Install

$ npm install --save git-raw-commits

Usage

var gitRawCommits = require('git-raw-commits');

gitRawCommits(options)
  .pipe(...);

API

gitRawCommits(gitOpts, [execOpts])

Returns a readable stream. Stream is split to break on each commit.

gitOpts

Type: object

Please check the available options at http://git-scm.com/docs/git-log. NOTE: Single dash arguments are not supported because of https://github.com/sindresorhus/dargs/blob/master/index.js#L5.

NOTE: for <revision range> we can also use <from>..<to> pattern, and this module has the following extra options for shortcut of this pattern:

gitOpts.from

Type: string Default: ''

gitOpts.to

Type: string Default: 'HEAD'

This module also have the following additions:

gitOpts.format

Type: string Default: '%B'

Please check http://git-scm.com/docs/git-log for format options.

gitOpts.debug

Type: function

A function to get debug information.

gitOpts.path

Type: string or array

Filter commits to the path(s) provided.

execOpts

Options to pass to git childProcess

Type: object

execOpts.cwd

Type: string

Current working directory to execute git in

CLI

$ npm install --global git-raw-commits
$ git-raw-commits --help # for more details

License

MIT © Steve Mao

Keywords

FAQs

Last updated on 27 Aug 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc